PDA

View Full Version : Thumbnail pic is terrible in color/quality - any ideas?



daddyrus
05-07-2004, 05:13 PM
The thumbnail pics on the listing end up in a terrible off colored format. Is there something i can change or fix in the settings or the program files to correct this or is it the picture file itself that needs to be fixed? Some of them look fine while others (most of them) are terrible.

Any advice or thoughts are appreciated.
thanks.

-Rus

marb
05-07-2004, 05:33 PM
In config.php find;

$config['gdversion2'] = False; // This Sets what version of gdLibs you have installed Set to tru is you have GD >= 2.0

Change False to True


Marten :)

daddyrus
05-07-2004, 05:42 PM
"True" Didn't seem to make a difference.Do you think I might have something else misconfiged like a path or base url? Also, I didn't have a config.php file, but this same one was in common.php - would I be correct in assuming they were the same file?

Thanks Marten.
copy of my code:
$config['allowed_upload_types'] = array('image/pjpeg','image/jpeg','image/gif', 'image/x-png'); // allowed file types
$config['allowed_upload_extensions'] = array('jpg','gif','png'); //possible allowed file extensions
$config['make_thumbnail'] = 'yes'; // use an external thumbnailing tool to resize images
$config['thumbnail_width'] = '100'; // max width (in pixels) of thumbnails
// This line is for GD Lib Image Support
$config['path_to_thumbnailer'] = $config['basepath'].'/include/thumbnail_gd.php'; // path to the thumnailing tool
$config['gdversion2'] = True; // This Sets what version of gdLibs you have installed Set to tru is you have GD >= 2.0

// These two lines are for ImageMagick Support
//$config['path_to_thumbnailer'] = $config['basepath'].'/include/thumbnail_imagemagick.php'; // path to the thumnailing tool
//$config['path_to_imagemagick'] = '/usr/X11R6/bin/convert'; // path to the convert tool, OPTIONAL! (Fill this only if you use ImageMagick)


-Rus

marb
05-07-2004, 05:52 PM
I was mean to say common.php

Think your settings are good.
Hope it works now, if not see topic;

http://www.open-realty.org/phpBB2/viewtopic.php?t=2431&highlight=thumbnails

http://www.open-realty.org/phpBB2/viewtopic.php?t=1756&highlight=thumbnails

http://www.open-realty.org/phpBB2/viewtopic.php?t=1290&highlight=thumbnails

Marten :)

daddyrus
05-07-2004, 06:04 PM
Marten - You're the MAN! Thanks for all your help through out this script thus far. You really help a lot! The pics show up fine now after reloading them and refreshing them. I knew that the cache should be a problem but I didn't think to reload them and clear cache.....

You're an asset to this forum! Thank you.

-Rus

thunderMex
06-17-2004, 01:22 AM
Gentlemen and Ladies,

BLUE THUMBNAILS GOT ME!

New OR installation where the php info tells me they have this:


gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled


My Common.php file is set to TRUE


// This line is for GD Lib Image Support
$config['path_to_thumbnailer'] = $config['basepath'].'/include/thumbnail_gd.php';
// path to the thumnailing tool
$config['gdversion2'] = True; // This Sets what version of gdLibs you have installed Set to tru is you have GD >= 2.0

My "thumbnail_gd.php" file says this:


$quality = 100; // jpeg quality -- the lower the num, the smaller the file size


And I keep getting a completely blue overcast thumbnail if there is blue in the sky. I have, as shown above, tried everything I see as possible suggestions. I have deleted the old thumbnail each time directly with FTP just to make SURE caching is not confusing me.

Any more bright ideas? I am using the latest offered download of Open Realty on the home page here.

And, what are the steps for INSTALLING imagemagick if this problem persists on my Apache Linux server with PHP 4.3.6 ?

thanks for all the great help...

David`

daddyrus
06-17-2004, 02:01 AM
Gentlemen and Ladies,

BLUE THUMBNAILS GOT ME!

New OR installation where the php info tells me they have this:


gd
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled


My Common.php file is set to TRUE


// This line is for GD Lib Image Support
$config['path_to_thumbnailer'] = $config['basepath'].'/include/thumbnail_gd.php';
// path to the thumnailing tool
$config['gdversion2'] = True; // This Sets what version of gdLibs you have installed Set to tru is you have GD >= 2.0

My "thumbnail_gd.php" file says this:


$quality = 100; // jpeg quality -- the lower the num, the smaller the file size


And I keep getting a completely blue overcast thumbnail if there is blue in the sky. I have, as shown above, tried everything I see as possible suggestions. I have deleted the old thumbnail each time directly with FTP just to make SURE caching is not confusing me.

Any more bright ideas? I am using the latest offered download of Open Realty on the home page here.

And, what are the steps for INSTALLING imagemagick if this problem persists on my Apache Linux server with PHP 4.3.6 ?

thanks for all the great help...

David`

It seemed to only work after clearing cache and shutting down the broswer, then bringing it back and checking the site again. Clear EVERYTHING in internet options,cookie, cache, eveything, and check it out. When I got the same problem you had, I reloaded the pics via ftp (I assume it kinda re-rassterized them) then cleared everything (via "internet options" in the Browser) and it was perfect. Thats a shot worth double checking if I was in your shoes.. Other then that, best of luck... :wink:

thunderMex
06-17-2004, 11:47 AM
Thanks for taking a shot at finding the answer for me.

However, yes, I have always known I can re-load via FTP, but if that is a daily maintenance chore I might as well batch everything in Photoshop.

I thought the cool idea was to do it via the browser and get them processed at the server. No? Having to make thumbnails locally and run them all up by FTP puts another job back in my hands on a daily, hourly, in some cases, basis.

I am supposed to be handing this over to a bunch of sales agents at a Real Estate company with the promise of spiffy "any idiot" can do this simplicity.

Not that I won't be overseeing it, but, that thumbnail thing has GOT to work.

David

daddyrus
06-17-2004, 11:58 AM
Thanks for taking a shot at finding the answer for me.

However, yes, I have always known I can re-load via FTP, but if that is a daily maintenance chore I might as well batch everything in Photoshop.

I thought the cool idea was to do it via the browser and get them processed at the server. No? Having to make thumbnails locally and run them all up by FTP puts another job back in my hands on a daily, hourly, in some cases, basis.

I am supposed to be handing this over to a bunch of sales agents at a Real Estate company with the promise of spiffy "any idiot" can do this simplicity.

Not that I won't be overseeing it, but, that thumbnail thing has GOT to work.

David

I'm sorry, David, I didn't mean to make each thumbnail yourself, I was recalling how I fixed that same problem. Here is exactly what i did:

1) fix the script like above (in the responces to my posts)
2) Find all the pictures I had put there orginally and erase them off the server.
3) Upload the script.
4) Clear my browser's cache and cookies and EVERYTHING I could.
5) upload the regular sized pictures again (started all over basically)
6) checked the site and everything was fine.

That's all I meant. Anyone who would make thumbnails for every agent in the company would be a fool huh... lol
send me your site and I will see if I can take a look and help you out.


:lol:

thunderMex
06-17-2004, 01:37 PM
Welllll, Alllrighty then!

The blue thumbnails problem I described was a 70% OPAQUE blue layer that almost totally obscured the image itself when the original jpeg had too much blue, say, from blue sky, nothing but blue sky from now on.

Well, I finally FIXED the problem. I changed some lines in the "thumbnail_gd.php" file. First of all, I may be wrong, but, I saw that certain functions were being defined with lines such as "ImageCopyResampled" or whatever. Point being, that things were being defined with inconsistent lower case, upper case, in the same script referring to the same definition of something. This OR installation fails completely in PHP with such inconsistency written elsewhere.

So, I don't know if it made a difference to my Apache server when processing images, but, I decided to make everything lowercase in the "thumbnail_gd.php" file, matching GD scripts I saw elsewhere on the internet.

THEN, I threw out some "elses" and "ifs" down about line 40.

Since I already KNEW my GD version was 2.0 or Higher, I didn't give the server a chance to think about "what ifs". I took out some conditionals and got this--leaving in the comment so that you can compare at line 40:


//New Function checks to see if GD2 functions are available for higher quality thumbnails
{
$dst_img = imagecreatetruecolor($dest_width, $dest_height);
}
//copy the original image info into the new image with new dimensions
//checking to see which function is available
{
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $imagewidth, $imageheight);
}

Since I don't know zip about PHP operating on an Apache server installed with Linux everything I do is unfortunately by trial and error. Perhaps someone can tell me if inconsistent capitalization in the "thumbnail_gd.php" script makes any difference to the actual functioning.

But--SHOOWEEEEE! After hours of failure with every solution mentioned on the forum I have achieved a breakthrough!! My thumbnails are brilliantly GORGEOUS now!

David

carolinagirl
08-20-2004, 01:24 PM
I did what you mentioned above and deleted the images off the server and whammo! I have great thumbnails!!!!

thunderMex
08-22-2004, 01:33 PM
Hello Carolinagirl,

If "the bomb" was directed at me, so to speak, then I am glad my relative ignorance has actually rewarded someone else.

Go you Tarheels!

David