comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: GIF compression support in ImageMagick - Re-Post
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: GIF compression support in ImageMagick - Re-Post [message #41605] Mon, 08 November 2004 12:33 Go to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Lince M Lawrence wrote:
> Thanks to all. Now Magic is working fine.
> I have another doubt. What should I do to optimize colour, also impart
> 16 colour, colour table.

I'm afraid you'll have to explain that question further. How do you mean
"optimize" and "impart 16 colour, colour table"? By the latter doi you
mean "16-colour colour table"? You do mean 16-colour, not 16-bit colour?
Are you asking about ImageMagick here, or IDL?

It may be that these URLs are relevant:

http://www.imagemagick.org/www/ImageMagick.html#details-colo rs
http://www.imagemagick.org/www/ImageMagick.html#details-dept h

They describe a couple of the options supported by ImageMagick.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: GIF compression support in ImageMagick - Re-Post [message #41608 is a reply to message #41605] Sun, 07 November 2004 19:52 Go to previous messageGo to next message
Lince.Lawrence is currently offline  Lince.Lawrence
Messages: 4
Registered: November 2004
Junior Member
Tom McGlynn <tam@lheapop.gsfc.nasa.gov> wrote in message news:<cmg3v5$942$1@skates.gsfc.nasa.gov>...

> Don't think you need to recompile... There is a delegates.mgk file
> (or something like that) that is read at run time to find the
> delegates.


Thanks to all. Now Magic is working fine.
I have another doubt. What should I do to optimize colour, also impart
16 colour, colour table.

Lince M Lawrence
Re: GIF compression support in ImageMagick - Re-Post [message #41619 is a reply to message #41608] Fri, 05 November 2004 06:37 Go to previous messageGo to next message
tam is currently offline  tam
Messages: 48
Registered: February 2000
Member
Ben Panter wrote:

> Lince M Lawrence wrote:
>
>> It end up with the following error:
>> sh: line 1: /usr/local/bin/gs: No such file or directory
>> sh: line 1: /usr/local/bin/gs: No such file or directory
>> convert: Postscript delegate failed `eqn10.eps'.
>> convert: missing an image filename `eqn10.gif'.
>>
>> What should I do. What is the missing component?
>
>
> As far as I can see, the missing component is gs - a program which deals
> with postscript interpretation. Quick solution would be to put a
> softlink from /usr/local/bin/gs to where ever you actually have
> ghostscript. Proper solution would involve compiling IM to know where gs
> really is.
>

Don't think you need to recompile... There is a delegates.mgk file
(or something like that) that is read at run time to find the
delegates.
Tom
Re: GIF compression support in ImageMagick - Re-Post [message #41622 is a reply to message #41619] Fri, 05 November 2004 02:16 Go to previous messageGo to next message
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
Lince M Lawrence wrote:

> It end up with the following error:
> sh: line 1: /usr/local/bin/gs: No such file or directory
> sh: line 1: /usr/local/bin/gs: No such file or directory
> convert: Postscript delegate failed `eqn10.eps'.
> convert: missing an image filename `eqn10.gif'.
>
> What should I do. What is the missing component?

As far as I can see, the missing component is gs - a program which deals
with postscript interpretation. Quick solution would be to put a
softlink from /usr/local/bin/gs to where ever you actually have
ghostscript. Proper solution would involve compiling IM to know where gs
really is.

type

where gs

to find this (in a shell, not IDL).

Hope that helps,

Ben


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Ben Panter, Edinburgh, UK
email is false. Use my name (no spaces) at bigfoot which is a com.
Re: GIF compression support in ImageMagick - Re-Post [message #41623 is a reply to message #41622] Fri, 05 November 2004 02:58 Go to previous messageGo to next message
Lince.Lawrence is currently offline  Lince.Lawrence
Messages: 4
Registered: November 2004
Junior Member
Mark Hadfield <m.hadfield@niwa.co.nz> wrote in message news:<cmdtuu$j3g$1@newsreader.mailgate.org>...

> The LZW patents on GIF have now expired (more or less). I believe
> current releases of ImageMagick support LZW compression by default (but
> I haven't checked and can't say for sure, as I never use GIF). So your
> best solution may be to download and install the current version of
> ImageMagick.

As you have adviced. I have updated the latest version. Now my problem
with the new version:

When I execute the command:
convert -antialias -transparent white -colors 16 -compress LZW
eqn10.eps eqn10.gif

It end up with the following error:
sh: line 1: /usr/local/bin/gs: No such file or directory
sh: line 1: /usr/local/bin/gs: No such file or directory
convert: Postscript delegate failed `eqn10.eps'.
convert: missing an image filename `eqn10.gif'.

What should I do. What is the missing component?

Thanks,
Lince M Lawrence
Re: GIF compression support in ImageMagick - Re-Post [message #41625 is a reply to message #41622] Thu, 04 November 2004 10:55 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Lince M Lawrence wrote:
> friends
>
> As in this message. How can I enable LZW in ImageMagick? Where should
> I alter the default option as advocated in the Quoted mail
> "--enable-lzw (configuration switch)"

That is an option to the "./configure" command, and applies if & only if
you are building from source. If you have installed a binary release,
the option may, or may not, have been applied when it was built.

The LZW patents on GIF have now expired (more or less). I believe
current releases of ImageMagick support LZW compression by default (but
I haven't checked and can't say for sure, as I never use GIF). So your
best solution may be to download and install the current version of
ImageMagick.

> Currrently I am using ImageMagick to convert EPS to GIF by punchin in
> the following command sequence in the command line:
>
> convert -antialias -transparent white -colors 16 -compress LZW
> eqn10.eps eqn10.gif
>
> The output should come around 4K, whiile using the above command I get
> a comparitively huge file of 20K. So I think the command "-compress
> LZW" is not executed correctly (may be due to the disabled LZW option)

It looks that way.

> Kindly pour-in your valuable comments.

Could you use PNG? It's much better in many respects.

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: GIF compression support in ImageMagick - Re-Post [message #41694 is a reply to message #41605] Tue, 09 November 2004 06:12 Go to previous message
Lince.Lawrence is currently offline  Lince.Lawrence
Messages: 4
Registered: November 2004
Junior Member
Mark Hadfield <m.hadfield@niwa.co.nz> wrote in message news:<cmol6d$ipu$1@newsreader.mailgate.org>...

> I'm afraid you'll have to explain that question further. How do you mean
> "optimize" and "impart 16 colour, colour table"? By the latter doi you
> mean "16-colour colour table"? You do mean 16-colour, not 16-bit colour?
> Are you asking about ImageMagick here, or IDL?

I will explain...

We do "convert -antialias -transparent white -trim -depth 16 -colors
16 $1 $2" and we get... (in Image Magic)
==============================================
Image: si1.gif
Format: GIF (CompuServe graphics interchange format)
Geometry: 7x7
Class: PseudoClass
Type: grayscale with transparency
Depth: 8 bits-per-pixel component
Colors: 16
0: ( 0, 0, 0) opaque
1: ( 4369, 4369, 4369) #111111
2: ( 8738, 8738, 8738) #222222
3: (13107,13107,13107) grey20
4: (17476,17476,17476) #444444
5: (21845,21845,21845) #555555
6: (30583,30583,30583) #777777
7: (34952,34952,34952) #888888
8: (43690,43690,43690) #aaaaaa
9: (48059,48059,48059) #bbbbbb
10: (56797,56797,56797) #dddddd
11: (61166,61166,61166) #eeeeee
12: (65535,65535,65535) white
13: ( 0, 0, 0) opaque
14: ( 0, 0, 0) opaque
15: ( 0, 0, 0) opaque
Filesize: 173b
Interlace: None
Background Color: white
Border Color: #dfdfdf
Matte Color: grey74
Page geometry: 7x7+0+0
Compression: LZW
comment: Image generated by GNU Ghostscript (device=pnmraw)

signature: 344c27d208a7f8792078b3c8e5b568e17387b4dbee3489f3173b0f5b57dd 584c
Tainted: False
User Time: 0.0u
Elapsed Time: 0:01
==============================================

But.. we want...
==============================================
Image: si1finished.gif
Format: GIF (CompuServe graphics interchange format)
Geometry: 9x7
Class: PseudoClass
Type: palette with transparency
Depth: 8 bits-per-pixel component
Colors: 16
0: ( 0, 0, 0) opaque
1: ( 8224, 8224, 8224) #202020
2: (24415,24415,24415) #5f5f5f
3: (42148,42148,42148) #a4a4a4
4: (53970,53970,53970) #d2d2d2
5: (59110,59110,59110) #e6e6e6
6: (63479,63479,63479) grey97
7: (65535,65535,65535) white
8: (32896,32896,32896) #808080
9: (65535, 0, 0) red
10: ( 0,65535, 0) #00ff00
11: (65535,65535, 0) yellow
12: ( 0, 0,65535) blue
13: (65535, 0,65535) #ff00ff
14: ( 0,65535,65535) cyan
15: (65535,65535,65535) white
Filesize: 170b
Interlace: None
Background Color: opaque
Border Color: #dfdfdf
Matte Color: grey74
Page geometry: 9x7+0+0
Compression: LZW
comment: Image generated by GNU Ghostscript (device=pnmraw)
signature: e02bdca57b1481410dd349058fa9d3d150e8ee97c714a1eaed51b0f7699a 79d4
Tainted: False
User Time: 0.0u
Elapsed Time: 0:01
==============================================
This result is obtained by another batch process in GraphicConverter
after the comand-line batch in Magic. Will I get this in a single
step?

What change should I make in the command. Please help

Thanks,
Lince M Lawrence
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Better plots with object graphics ?
Next Topic: Z-buffer and /noerase problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:35:00 PDT 2025

Total time taken to generate the page: 0.80129 seconds