Thumbnail creation: no white background for GIFs

More
12 years 1 month ago #29573 by kenmcd
.
Here is the URL to one of your "bad" images:
www.muenstermann.com/components/com_flex...100&aoe=1&q=95&f=gif
On that GIF the background is #fcfefc (grayish, not white).

If I add Georgios filter settings ( &fltr[]=rcd|256|0 ) to the URL like this:
www.muenstermann.com/components/com_flex...oe=1&q=95&f=gif&fltr []=rcd|256|0
(appears this forum does not like the brackets in the link, so add the filter to the URL yourself)
The GIF background is now #ffffff (100% white).

This appears to confirm that dithering is the issue.

:mrgreen:
.

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29575 by kenmcd
Hmmmm . . .

I just thought about something else so I looked at the original GIF.
And found that the file andritz.gif is only 5-bit color depth, not 8-bit (256 colors).

So it could be the limited color palette in the original is having an effect on the conversion.
And perhaps the 256 color setting is what is fixing the issue by making sure all colors from the original are present in the new image (no substitutions).

Dunno.


EDIT:
Nope.
It is the dithering causing the problem.
I changed the dithering to On ( &fltr[]=rcd|256|1 ) and the gray background is back.

.

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29576 by ggppdk
thanks Ken, you are right but dithering is not the only reason

-- the main reason for this effect is resizing

-- and yes using maximum colors (256) improves the problem


ken, your URL worked because the image dimensions were not changed !!!


So, i tested by resizing the image for same URL (to 150x80) and the background became #FEFEFE
[url=http://www.muenstermann.com/components/com_flexicontent/librairies/phpthumb/phpThumb.php?src=/images/stories/flexicontent/l_andritz.gif&w=150&h=80&aoe=1&q=95&f=gif&fltr[]=rcd|256|0] www.muenstermann.com/components/com_flex...oe=1&q=95&f=gif&fltr []=rcd|256|0[/url]


-- Resizing a gif image creates colors that did not exist to previous image , thus the palette of colors needs to be changed, but GIF has a maximum number of colors of 256 some colors of the image will use the closest match


1. Only way to workaround this is to force the inclusion of a color in the palette, but i do not of such an option and also what about other backgrounds ????

2. Another alternative would be to make your images transparent instead of having white background.

In sort this is not a bug, it is a limitation of the GIF image !!! so you will have to leave with this.

Ken , maybe we can leave the forced use of 256 colors ????

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29577 by kenmcd
. . .
I changed the dithering to On ( &fltr[]=rcd|256|1 ) and the gray background is back.


If leaving the 256 colors On minimizes user issues I am all for it.
:D

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29578 by ggppdk
Yes besides the size of gifs is small even for 256 colors,

and resizing creates more colors so using the number of colors of the original image is not appropriate anyway,

thanks


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #29585 by Rooney
First of all thanks to both of you working on this issue.

kenmcd wrote: I just thought about something else so I looked at the original GIF.
And found that the file andritz.gif is only 5-bit color depth, not 8-bit (256 colors).

I am using Photoshop's save as web file function and the files are saved with 256 colors.

Also, saving the files with transparent background is not feasible because I am using the logos of the companies and most of the time I do not have the logos as eps or in vector format. So the logos already have a white background and I am just putting them into a 200x100 pixel image with white background to have all logos the same size.

I could of course just save them as png because pngs are not effected. But then I have to change about 200 articles because every logo on the page as a single article...

Rooney

Joomla! 3.9.24 and FC 3.3.9

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.450 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline