This topic is locked

Display thumbnail but link to View page?

6/22/2007 3:43:14 AM
PHPRunner General questions
A
asimha author

Good morning all,
I am still having a problem which I cannot resolve however much I try!
I am displaying image thumbnails using the built-in Visual Editor functions. This works fine.
Now I would like to display the thumbnail but point the link to the View page (built-in function)
I can do this easily but only if I predefine the size of the thumbnails in the visual Editor which basically results in displaying the thumbnails with a wrong aspect ratio ...
Can anyone give me hint?
Many thanks

André

Sergey Kornilov admin 6/23/2007

I would suggest to use "View as" type "Custom" to display a thumbnail and link it to the View page.

A
asimha author 6/26/2007

I would suggest to use "View as" type "Custom" to display a thumbnail and link it to the View page.


Thank you Sergey, will try that.
On another note, is there any way to improve the quality of the thumbnails created by an image upload? Is there a parameter somewhere for that?
Many thanks

Andre

J
Jane 6/26/2007

Andre,
to set up thumbnail size change Thumbnail size value on the "Edit as" settings dialog on the Visual Editor tab

A
asimha author 6/26/2007

Andre,

to set up thumbnail size change Thumbnail size value on the "Edit as" settings dialog on the Visual Editor tab


Thank you Jane, I figured this one out actually, I was really referring to the "image quality" of the created thumbnail (not the size).
Meanwhile I have converted them in batch mode using Irfanview and the quality is much higher than the auto-conversion made after the image file is uploaded through my PHPRunner site so I was wondering whether there was a setting for this somewhere in the conversion routine?
Example converted by PHP-Runner as an image upload (150pixels)


Example converted externally in batch mode (150 pixels for the longest side)


Thank you

André

Alexey admin 6/28/2007

Andre,
there is no image quality parameter in PHP however there is an alternative function for image resizing that may do this better.

Try to modify generated commonfunctions.php file.

Find this line there:

imagecopyresized($thumb,$img,0,0,0,0,$nsx,$nsy,$sx,$sy);

and replace it with:

imagecopyresampled($thumb,$img,0,0,0,0,$nsx,$nsy,$sx,$sy);


Let me know if this helps or not.

A
asimha author 6/28/2007

Andre,

there is no image quality parameter in PHP however there is an alternative function for image resizing that may do this better.

Try to modify generated commonfunctions.php file.

Find this line there:

and replace it with:

Let me know if this helps or not.


Thank you Alexey, no noticeable difference by using the 2nd function. It's a bit of a pain but I prefer to make the thumbnails manually now that our database is nearly up to date.

Not to worry but would be a nice future feature to be able to specify the thumbnail-quality (depth or size possibly) as I am sure this is feature that many of us use.

Thanks again!

André

C
chaz 6/28/2007

it takes some great algorithm to reduce the size and still maintain the quality....GD2 is generic as they come.....
try Imagemagic and use their function and compare