Jump to content

Strange thumbnails pictures


Auseagle

Recommended Posts

hi guys, i really need the helps in here, this is so urgent to our website. we are using Prestashop 1.4.9(Because the theme doesn't work in latest version, sorry), and we try to upload white background jpg picture for all of our products, but after uploading, all the thumbnails(normal, large, home etc) are having a strange background lines in each picture. please have a look the attached files, i also attached images.inc.php in there. please let me know what should i do about it. i searched a lot on forum, i think it's related to images.inc.php file. please help!

 

thanks a lot!

Appreciated!

Strange picture.tiff

strange picture 2.tiff

images.inc.php

Link to comment
Share on other sites

Hi Auseagle, I assume you mean the strange curves in the upper right upper corner, right?

A few questions:

- What format do you use to upload the pictures?

- What Image quality setting do you use? (Preferences->Image)

- Do you have a link to a page that shows the problem?

-The pictures you show, did you save them using right click-> save, or grabbed them from the screen? (I ask, as there may just be something 'OVER' the picture that shows like it's IN the picture. A watermark or so, or a corrupted 'New product' icon or so)

- When did the problem pop up? What did you just before it started? Added things in B.O., changed any php/tpl/?? file?

 

pascal

  • Like 1
Link to comment
Share on other sites

Hi Pascal,

 

thanks for your reply.

 

if you clearly look at the whole picture, you can see some small lines are everywhere in the picture.

 

for the questions you requested, i asked them in blue:

 

- What format do you use to upload the pictures? JPEG
- What Image quality setting do you use? (Preferences->Image) i am using JPEG 90.
- Do you have a link to a page that shows the problem? www.tiviss.com, if you check on all pictures, you will see it better.
-The pictures you show, did you save them using right click-> save, or grabbed them from the screen? (I ask, as there may just be something 'OVER' the picture that shows like it's IN the picture. A watermark or so, or a corrupted 'New product' icon or so) i made a pure white background picture from PS, and there's nothing wrong on the pictures by itself, it's only doing it after i upload them onto website.
- When did the problem pop up? What did you just before it started? Added things in B.O., changed any php/tpl/?? file? those picture were grey background before, but we found that it's not good enough to show the product, so we used PS to make every picture into white background.

 

Thanks a lot!

Link to comment
Share on other sites

Can you check/do a few things?
Can you check if the picture you uploaded BEFORE they are resized etc. is still ok? Go to your shop root, go into img folder, go into 'p' folder, go into any number folder etc.etc. until you see image files. There's one that is your original one: the one with only a product ID number, like 11.jpg. Please open and see if it there goes wrong already. Also check other files iin this folder and let me know the result

Can you save an original picture as PNG or gif file and use this to upload? Does this give the same problem?

Change your setting in Preferences-> images, picture quality to use PNG. Try again to upload a PNG or gif file. Same problem??

Edit locally the pictture with another picture editor, like paint or so. Save file. Use this file to upload. Same problem? (It can be that Photoshop gives the problem...)


My 2 cents,
Pascal

Edited by PascalVG
, Photoshop, that is... (see edit history)
Link to comment
Share on other sites

Hi Pascal,

 

Thanks for your help. sorry about the late reply. i also answered your questions in blue.

 

Can you check/do a few things? 
Can you check if the picture you uploaded BEFORE they are resized etc. is still ok? Go to your shop root, go into img folder, go into 'p' folder, go into any number folder etc.etc. until you see image files. There's one that is your original one: the one with only a product ID number, like 11.jpg. Please open and see if it there goes wrong already. Also check other files iin this folder and let me know the result All original files on server are fine, pure white background. all thumbnails have the same tiny lines at the background.

Can you save an original picture as PNG or gif file and use this to upload? Does this give the same problem? same problem but different lines.

Change your setting in Preferences-> images, picture quality to use PNG. Try again to upload a PNG or gif file. Same problem?? same problem but different lines.

 

i also tried to use some other white background files which i download them from the web, it has the same problem as well. the next thing i will try is increase the JPG quality to the highest.

 

thanks a lot.

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

Did you save a picture using another editor already before uploading? Just to see if there's anything going wrong with 'compatibility'? (one jpg may not be fully the same as others...)

 

 

In your first post you said you used to have a grey background. Didn't it have the issues back then?

 

pascal

Link to comment
Share on other sites

  • 2 weeks later...

Hi Auseagle,

 

Can you do the following for me? Add a zip file with the "original file" ( but after upoading, so taken from your website, like a file 11.jpg or so) and a modified file where it goes wrong (like 11-large_default.jpg or so) Please copy the files from the server. ) and add them here?

 

What I see in the ImageManager.php that (of course), the do some dividing to resize. Can it be that sometimes some 'rest' value when dividing knocks over a bit and causes these problems?

 

What you can do is trying to modify the sizes of the diverse pictures so they are more 'dividable', so values like 64,128, 256, 512 etc and make your original then say 512 X 512 or so.

(Preferences->Image)

 

pascal

Link to comment
Share on other sites

Hi Pascal,

 

thanks for you reply. i have attached the zip files in here.

 

i didn't quite get what you want me to try in last message, you mean i try to change the "small, medium, large, thickbox, etc" to more dividable size like 256*256, 512*512? but i tested a lot to make sure the size i choose make the most impression to the website.

 

thanks. 

121.zip

Link to comment
Share on other sites

Can I ask you to change your resolution on your monitor for a moment to say 1024x768 or, if you use that already, 800x600? Do you still see the same lines, in the same spot?

For the grace of god, I don't see anything wrong in any of the pictures... (but maybe it's just me, my eyes are getting worse lately... 8-(  )

 

Did you try in another browser, or on another computer, if you see the same problem??

 

hmmmm....

pascal

Link to comment
Share on other sites

Hi Auseagle, last try:

With the files that you sent me, can you EDIT file: 121-135-thickbox.jpg

you say you see error lines in here. Are they clearly visible to you in the editor?

if so, If you zoom in onto the picture, are these error lines magnified as well. As they still clearly visible to you (Maybe even clearer)?

If so, please put a circle around one or more places where you clearly see these error lines and send me the picture with these circles one more time so i can hopefully see what you mean.

 

Getting nuts over this one... :wacko:

pascal

Link to comment
Share on other sites

Update:

Interesting: Now understand why I didn't see them first. Opened them in Photoshop and this program fixes the problem automatically! This morning I opened them in another app, and there I (finally) saw them.

post-455771-0-82514400-1381382506_thumb.jpg

Image Auto-fixed in Photohop

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi Auseagle,

Did you ever turn on error/debug mode, to see if there are warnings during the upload/thumbnail creation? Maybe try if there's anything wrong (memory shortage, other warning)

 

In config/define.inc.php, the first code line (skip comment copyright etc lines a little)

change false into true:

/* Debug only */
define('_PS_MODE_DEV_', true);
 
See if this gives any clue. Searched many times the internet for anything, but can't find anything that looked similar to your problem...
 
Desperate to help, but no real clues,
pascal
Link to comment
Share on other sites

Did you ever try to convert the pictures outside PrestaShop, just directly in a small script?

maybe try some things like this:

<?php
$image
= imagecreatefrompng('image.png');
imagejpeg($image, 'image.jpg', 70);
imagedestroy($image);
?>

 

(taken from:

http://stackoverflow.com/questions/1201798/use-php-to-convert-png-to-jpg-with-compression

there are some more samples)

 

and some resizing, like:

http://stackoverflow.com/questions/12661/efficient-jpeg-image-resizing-in-php

 

 

as far as I know, PrestaShop uses the standard PGP image function from GD. Not sure, but heard that ImageMagick would produce much better quality, like here:

http://www.sitepoint.com/forums/showthread.php?680282-GD-or-ImageMagick&s=c6fee8822bfd605bacb7026b66edd89c&p=4617771&viewfull=1#post4617771

 

Have no idea if using ImageMagick would need a re-writing of the image functions, or that they override the GD function directly.

But maybe give it some attention.

 

 

BTW, what value has your

 memory_limit

in your php.ini file?

 

 

pascal.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Pascal and everyone,

 

we found out it's related to image re-sizing process. my original pictures are 1000*1000, but my medium is 300*300, my thick box is 600*600, large scene is 800*800. we tried to reduce our original pictures to 600*600 and uploaded to the website, it's prefect for medium and thick box.

 

So what we are thinking is maybe 600*600->300*300->150*150 will be fine.

 

i am following this clue to try to fix the problem, will let you guys know later. 

 

Thanks all, especially PascalVG! Thank you very much.

Link to comment
Share on other sites

Hi Auseagle,

Thanks for the info. I hope this works.

When I have time, I may do some more tests on resize, just out of curiosity (not now, though, extremely busy at the moment). So let me know the outcome of your own additional tests!

 

Make sure you make your 'large' not bigger than your original! (600->resize to 800 will be terrible for sure ;-)  )

 

pascal.

  • Like 1
Link to comment
Share on other sites

  • 4 years later...

Hi @Auseagle

I have the same problem as you: pure white images created by Photoshop or illustrator are rendered with some tiny grey lines. Should I proceed by CSV import (worse: more grey lines) or direct import in the Back Office, did you find a solution?

Thank you,

Raph

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...