Problem displaying gif after mogrify -crop

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?".
Post Reply
jamtat
Posts: 47
Joined: 2010-05-10T16:51:23-07:00
Authentication code: 8675308

Problem displaying gif after mogrify -crop

Post by jamtat »

Hi. From what I gather so far the problem I am seeing relates mainly to the program I am using to display a gif after processing it using the mogrify -crop command--namely with feh (and maybe with giflib). I do not believe the issue relates to IM since I can display that processed gif just fine using other graphics programs. And, in fact, the problem just appeared a few days ago after I did a software update that probably got me a new release of feh. Still I'm really hoping I can continue using feh like I have been for a few years now to display a desktop background image. Maybe there is some additional switch I can pass along with the -crop switch in order to make feh display the image?

The scenario is that, periodically throughout the day, I download a national weather map in gif format. I don't need the whole map displayed as my desktop background, but rather just a section that centers on my area of the country. So, once the gif is downloaded, I run mogrify -crop 1920x1080+1200+50 /home/user/downloaded.gif on it before telling feh to display it on the background of my desktop. But like I mentioned, feh is no longer displaying that processed image, giving the error message "No Imlib2 loader for that file format feh: No loadable images specified." feh will display the fuller, non-processed gif, btw. But something is happening during the processing that causes it subsequently to refuse to display the image. As mentioned, other graphics programs I've tried to display the processed image with seem to have no problem with it.

Can anyone suggest any additional switch I might introduce to make the gif once again displayable by feh? Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem displaying gif after mogrify -crop

Post by fmw42 »

Try adding +repage after the crop. Does that help? Try using convert rather than mogrify. Does that help?

What version of IM and what platform? Please always provide that when asking questions here.
jamtat
Posts: 47
Joined: 2010-05-10T16:51:23-07:00
Authentication code: 8675308

Re: Problem displaying gif after mogrify -crop

Post by jamtat »

Thanks for the quick reply, fmw42. A preliminary test indicates that adding the +repage switch will likely resolve this issue. I wanted to use the mogrify command for this since my aim is to overwrite the original image with the new one and I'd understood that the mogrify command is the way to do that. This is Arch Linux, btw, ImageMagick 6.9.3-8.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem displaying gif after mogrify -crop

Post by fmw42 »

convert will override the input with the output if you use the same name.
Post Reply