animated .gifs and IM

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
cassy

animated .gifs and IM

Post by cassy »

Hi there,

I'm with a new host with IM on the server now (Version: ImageMagick 6.3.7 08/09/09 Q16 ) and have set up a test session with Joomla 1.5.15 and JoomGallery 1.0.4. in JoomGallery I have set IM as the image processor which is being recognized.

I have 15 animated gifs for testing all created with photoshop CS2 and while they all show up after upload the majority of them is not looking the same way they do when viewing them on my desktop. there are also differences when checking them with different browsers

I use IE7, FF3, Opera10, Safari4 and Chrome4 (latest builds each) for testing purposes

The problem is that of the 15 animated gifs
- only 5 work properly in all 5 browsers,
- another 6 work fine in FF3, Opera, Safari and Chrome but either don’t show any animation at all in IE7 or only show the animation in the large image display (click thumb or use detail link).
- 1 image is being displayed messed up in all browsers
- 1 image with 3 frames is displayed messed up in all but IE7 while IE7 skips the 3rd frame
- 2 images are being displayed messed up in all but IE7 while the animation is not working in IE7

I have no idea if its IM, the way IM is set up in JoomGallery, my images or anything else.
could somebody please help me figure whats wrong and preferably also how to fix it?
Last edited by cassy on 2010-04-10T04:35:25-07:00, edited 1 time in total.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: animated .gifs and IM

Post by Bonzo »

Image magick modifys and creates images; it is not used for displaying images.

What happens if you upload the gifs to your server without going through the gallery ?
cassy

Re: animated .gifs and IM

Post by cassy »

in this case let me phrase things differently:

after using IM as the image processor the images are messed up

I just downloaded some thumbs and large images from my web server and can confirm that these images are messed up when viewing them on my desktop (windows explorer - view - movie clip (not sure if thats the correct terms as my XP doesn't come in english))
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: animated .gifs and IM

Post by fmw42 »

How were they created? How did you use IM to process them? What was the command line for IM processing? Can you post links to the original and the processed gifs?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: animated .gifs and IM

Post by Bonzo »

I pressume they must be getting resized or something during upload/including into the gallery.

Are the gifs you downloaded a differnt file size to the ones you uploaded ?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: animated .gifs and IM

Post by snibgo »

They all seem fine in Firefox 3.5.8. In Internet Explorer 8.0.7600, some of them don't animate.

If you have created them in Photoshop, what part does IM play? Perhaps you created the full-size versions in PS, and Joomla used IM to shrink them so 15 can fit on one page. If you can discover what Joomla is telling IM to do, that would help disgnose.

Your server is running an old version of IM, which won't help.

You might try shrinking the GIFs yourself, using IM or photoshop, and testing under the various browsers.

I downloaded the small and large versions of "Euro doors and windows". The small version desn't animate under Internet Explorer. I re-created the small version from the large one:

Code: Select all

convert euro_doorL.gif -resize 239x168 euro_doorS.gif
euro_doorS.gif does animate under Internet Explorer.
snibgo's IM pages: im.snibgo.com
cassy

Re: animated .gifs and IM

Post by cassy »

I used Photoshop CS2 for them - created an image with all the layers I meant to use. in frame 1 turned off visibility for all layers but the desired ones. set delay to 3 secs. created frame 2 etc in the same fashion . all other settings are default.


In the code of JoomGallery there is:

$convert_path='convert';
$commands = ' -resize "'.$destWidth.'x'.$destHeight.'" -quality "'.$dest_qual.'" -unsharp "3.5x1.2+1.0+0.10"';
$convert = $convert_path.' '.$commands.' "'.$src_file.'" "'.$dest_file.'"';

the quality is set to 100 in the component's config


would you mean providing you with the images ? the originals on my desktop are 15mb in total (500kb to 1.8mb each) plus downloading those from my server (originals, slightly downsized large images and thumbs) should make about another 25mb. can I email them your way?
cassy

Re: animated .gifs and IM

Post by cassy »

Bonzo wrote:I pressume they must be getting resized or something during upload/including into the gallery.

Are the gifs you downloaded a differnt file size to the ones you uploaded ?
yes they are:

the thumbs are set to a wdth of 240 and a height of 200
large images (detail link) are set to a max width/ height of 700
original images (which can be seen clicking the thumbs) come with a width of about 1000
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: animated .gifs and IM

Post by snibgo »

Joomla is issuing a slightly naff command: the options should be after the input file name, not after it. However, when I issue the (Windows) command:

Code: Select all

convert -resize 239x168 -quality 99 -unsharp 3.5x1.2+1.0+0.10 euro_doorL.gif euro_doorS3.gif
the resulting file is the correct small size, and animates under Internet Explorer.
snibgo's IM pages: im.snibgo.com
cassy

Re: animated .gifs and IM

Post by cassy »

snibgo wrote:They all seem fine in Firefox 3.5.8. In Internet Explorer 8.0.7600, some of them don't animate.

If you have created them in Photoshop, what part does IM play? Perhaps you created the full-size versions in PS, and Joomla used IM to shrink them so 15 can fit on one page. If you can discover what Joomla is telling IM to do, that would help disgnose.
IM is being used for resizing the images (not for creating them). GD2 library as one alternative cannot handle resizing animated gifs, only IM can. in using GD2 library the large image mustn't be resized to prevent the loss of animation while the thumbs could never be animated. IM
snibgo wrote:Your server is running an old version of IM, which won't help.
would you mean the reason for the prob is the IM version?
snibgo wrote:You might try shrinking the GIFs yourself, using IM or photoshop, and testing under the various browsers.
certainly. only since I'm setting up a website that allows users to submit images to an image gallery what should I tell them about the size of the original animated gifs? should those then never be larger than what is set as a max width/ height for resized large images (here: 700 px)?
snibgo wrote:I downloaded the small and large versions of "Euro doors and windows". The small version desn't animate under Internet Explorer. I re-created the small version from the large one:

Code: Select all

convert euro_doorL.gif -resize 239x168 euro_doorS.gif
euro_doorS.gif does animate under Internet Explorer.
yes I noticed that it works in the other browsers but not in IE7 (don't have IE8 installed thus cannot check there)
cassy

Re: animated .gifs and IM

Post by cassy »

snibgo wrote:Joomla is issuing a slightly naff command: the options should be after the input file name, not after it. However, when I issue the (Windows) command:

Code: Select all

convert -resize 239x168 -quality 99 -unsharp 3.5x1.2+1.0+0.10 euro_doorL.gif euro_doorS3.gif
the resulting file is the correct small size, and animates under Internet Explorer.
sorry but I'm not quite following:

Code: Select all

the options should be after the input file name, not after it
what would you mean? move $commands to a position after the filenames? or after the source file's name?

$convert = $convert_path.' "'.$src_file.'" "'.$dest_file.'" '.$commands.' ';
or
$convert = $convert_path.' "'.$src_file.'" '.$commands.' "'.$dest_file.'" ';
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: animated .gifs and IM

Post by snibgo »

Yes, sorry, I wrote "the options should be after the input file name, not after it" but I meant "the options should be after the input file name, not BEFORE it"

It should be like this:

$convert = $convert_path.' "'.$src_file.'" '.$commands.' "'.$dest_file.'" ';


My tests show that the current IM can resize a gif, and the result animates in IE8. I suggest you simulate what IM is doing on both the server (running an old IM) and on a local machine with the current IM. If you get a bad result on the server but a good one locally, you'll know what the problem is.
snibgo's IM pages: im.snibgo.com
cassy

Re: animated .gifs and IM

Post by cassy »

@ snibgo :

thanks for the confirmation!

I have modified the code in joomgallery now and have submitted 4 of the gifs again but with the same result (you can see them yourself at the above link. the image names start with 'Test')

now lets see if I can get IM to run on XP
Last edited by cassy on 2010-04-03T10:01:12-07:00, edited 1 time in total.
cassy

Re: animated .gifs and IM

Post by cassy »

odd! after installation of the binary all I have is a viewer ?

all of those commands for verifying IM are returning the following error:

the command $magick is misspelled or could not be found (translated)

Visual C++ 2008 Redistributable Package (x86) is already available and using the repair feature on the install shield wouldn't change anything
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: animated .gifs and IM

Post by fmw42 »

some browsers won't animate if the delay between frames is too short. Be sure that there is a delay set properly.
Post Reply