• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

Fixing ugly gif thumbnails?

Status
Not open for further replies.

gifDB

Chevereto Member
Hello,

So I'm really liking the improvements made in 2.0.9 so far. There's only one problem that I'm noticing right away.
The thumbnails being made from .gif images are hideous. I'm noticing chunks of white pixels all over them. This is a problem I didn't have with the 1.9.X release.

Here's a link so you can see what I'm talking about:
http://gifdb.com/browse.php

Any ideas on how to fix this? Thanks.
 
Alright, so it looks like all of the white I'm seeing is just a transparency layer over my white background.
It must just be getting goofed up when it resizes the gif's.

Anyway, I found a half solution that works for me. I edited the .css file in my theme to include a new div with a black background.

Code:
#thumbs {
    background-color: #000000;
    width: 100;
    height: 90;
    float: left;
    overflow:hidden;
}

Then, where I post my thumbnails, I just encase them in those div elements.

Code:
$display .= "\t\t<div id='thumbs'><a href='http://gifdb.com/{$link}{$image}'><img width='100' height='90' src=\"{$where}{$image}\" /></a></div>\n";

As you can see, showing a black layer behind the transparency looks much nicer than the white.
http://gifdb.com/browse.php

Still doesn't really fix the root of the problem though.

Cheers.
 
Ok, I have just find the problem.

The thing is that all the resizes pass to a filter to make prettier thumbs but on the .gif this just make ugly thumbs. This also make ugly thumbs when the image has transparency, just try to upload a png with alpha and you will notice it.

This is because a bug on the php imageconvolution function, so let's just filter the .jpg images...

open includes/classes/class.upload.php and replace this:
PHP:
if(function_exists('imageconvolution')) {

with this:
PHP:
if(function_exists('imageconvolution') && $extension=='jpg') {

This will be on 2.0.10
 
Status
Not open for further replies.
Back
Top