Jump to content

Picture background color, become BLACK !


Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
This is what happen, after since Regenerate Thums!

what is the pic of ?
- small
- medium
- large
- thickbox ????????
- category
- home
- large_scene
- thumb_scene

if the pic of thickbox, you can adjust file thickbox.css in www.yourdomain.xxx/css/thickbox.css

look at line 40-50
.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
.TB_overlayBG
{
background-color:#000;

filter:alpha(opacity=75);

-moz-opacity: 0.75;

opacity: 0.75;
}

maybe opacity=100,

good luck
Link to comment
Share on other sites

  • 3 weeks later...

Much appreciated for your reply! This is really helpful in keep moving forward without, stuck on the same place! As it is the New Year already 2009, Yeah ! Happy New Year!


So if it is the thinkbox I will just do that! If it is medium picture, I will just do the similar things right!


Man, I will always remember your kindness help! Hope, I can also help u back some other way!


Best Regards,


Jeffrey Szeto
hongkongapple.com ( My badly skill builded )

Link to comment
Share on other sites

I have already tried any different Menthods! Still not sure how it background color of a Picture would be change to White!

Currently it is as picture shown, happen only after upgrade / watermark!

@Jeffrey,
You try to adjust file (images.inc.php) in root, maybe your problem from here. I am not sure, because I'm not tested yet.
code #line 30-34
/* We need to resize */
           else
           {
               $ratioX = $x / ($y / $size);
               $newImage = ($imageType == 'gif' ? imagecreatetruecolor($ratioX, $size) : imagecreatetruecolor($ratioX, $size));

               /* Allow to keep nice look even if resized */
               $white = imagecolorallocate($newImage, 255, 255, 255);
               imagefill($newImage, 0, 0, $white);
               imagecopyresampled($newImage, $imageGd, 0, 0, 0, 0, $ratioX, $size, $x, $y);
               imagecolortransparent($newImage, $white);

               /* Quality alteration and image creation */
               if ($imageType == 'gif')
                   imagegif($newImage, _PS_TMP_IMG_DIR_.$cacheImage);
               else
                   imagejpeg($newImage, _PS_TMP_IMG_DIR_.$cacheImage, 86);
           }
       }
       return '';
   }
   return '';


Brgds

Link to comment
Share on other sites

  • 3 weeks later...

I have the same problem. When i upload a regular gif image, the entire image gets a black background. If i convert the image to a jpg file before upload i get a white background, but with a black fra in the product view.

My shop installation used to work, but has falied since the move to a new host. A clean install on the new host has the same problem. The old host was PHP 5.2.43 and the new host is 5.2.8

Any suggestions ?

4355_yGre2Zy87uE8JTV8waPB_t

Link to comment
Share on other sites

Looking from the line 30s of images.inc.php

The Filling of the blank space should be White color !! But its weir that, its turn out to be black!!


/* Allow to keep nice look even if resized */
$white = imagecolorallocate($newImage, 255, 255, 255);
imagefill($newImage, 0, 0, $white);
imagecopyresampled($newImage, $imageGd, 0, 0, 0, 0, $ratioX, $size, $x, $y);
imagecolortransparent($newImage, $white);





May the dear team members would know the answer to this! pls give a hints!

Cheers

4385_NHt5RGq2WWgvi5gbEC7O_t

Link to comment
Share on other sites

  • 2 weeks later...

In my shop http://djshop-hk.cz/presta/ after applying this script is still black background in some images


Hi Mardon,

Try uploading a new picture.
The old ones which you have uploaded earlier will remain black, unless you edit them.

I guess it should work.

Try creating a new category and upload a PNG image with just blue text and no background.

If the blue text appears on white background, everything worked fine.

Let me know what happens.

Cheers..

Cronos
Link to comment
Share on other sites

  • 2 weeks later...
In my hosting I use
imagefilledrectangle ($destImage, 0, 0, $destWidth, $destHeight, $white);


without

imagefill($destImage, 0, 0, $white);



in images.inc.php in function imageResize
and images are OK, try it



Can you upload your working images.inc.php file? can't get any of this "solutions" to work.
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 6 months later...
  • 3 weeks later...
  • 1 year later...
  • 2 weeks later...
  • 3 months later...
  • 9 years later...

The black background on the images appears only on those images that originally had a transparent background (in PNG and GIF formats), and after you have activated the Watermark module and rebuilt the thumnails. If you want to use the Watermark module for your product pictures you must convert transparent color into white color. This can be achieved easily by saving the PNG or GIF picture in another format, for example JPG format. This will automatically convert all areas with transparent color into white color. IrfanView by default is replacing transparent color with black color but this behaviour can be changed in the program settings.

image.png.fd8147f82250340e24d21185d3c27375.png

I believe that the Watermark module should be upgraded to allow the Back Office administrator to select the color (black or white) to replace the transparent color in the PNG and GIF images while processing the images to superimpose the watermark.

image.thumb.png.9cb1136ab6738f8127e0733b9aefd7a4.png

 

Edited by Alexander Firsov (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...