Help with gif output

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
theelf
Posts: 1
Joined: 2014-12-17T17:03:08-07:00
Authentication code: 6789

Help with gif output

Post by theelf »

Hi!! greetings

First... imagemagick is AMAZING, thanks for the incredible work

Second, sorry my bad english :)



Ok, im on Windows XP x64, imagemagick 6.9.0-0 Q16 x64


My idea, is to convert jpg images in cbz to gif files, to make smaller comics to my kobo reader


I made a batch file


mogrify -bordercolor white -border 1 -fuzz 26550 -trim -quality 100 -format png %1
mogrify -resize 758x1024 -extent 758x1024 -gravity center -quality 100 -format png %1
mogrify -sharpen 8x8 -type Grayscale -depth 4 -colors 8 -quantize Gray -format gif %1


Ok, with this, first, i trim all white spaces, i need to add a white border because many black images. Here no problem

Second, i resize to 758x1024, and extent the image to 758x1024 to be sure all images have same size. Ok, no problem


And last, i convert the png to gif, and reduce color.... OK, here the problem came




Because is difficult to explain, i take some screenshots


1 - Here is the original jpg, 662x1000

Image


2 - Here is the png output after

mogrify -bordercolor white -border 1 -fuzz 26550 -trim -quality 100 -format png %1
mogrify -resize 758x1024 -extent 758x1024 -gravity center -quality 100 -format png %1

Image


3 - And the gif output after

mogrify -sharpen 8x8 -type Grayscale -depth 4 -colors 8 -quantize Gray -format gif %1


Image

840x1114 ?¿¿???? whyy????




But the most strange stuff, is that windows say is 840x1114, but if i open the file in Paint Shop Pro... say is 758x1024...the correct size


Image



NOTE: If i convert the gif to png again, it became 758x1024 :shock:




The big problem, is that my reader, seems that get the wrong size too, and try to display 840x1114...




Im a little lost, thanks in advance for any help


Greetings
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Help with gif output

Post by snibgo »

Change "-trim" to "-trim +repage".
snibgo's IM pages: im.snibgo.com
Post Reply