Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Which graphics format can Perl alter easier and more?

by Jouke (Curate)
on Aug 12, 2001 at 16:40 UTC ( #104237=note: print w/replies, xml ) Need Help??


in reply to Which graphics format can Perl alter easier and more?

There is no graphical format that Perl is "better" or "worse" in. We (probably) all know the problems there are with the .gif format because of Unisys' patents on the LZH algorithm. Therefore packages like GD officially no longer support .gif.

The .png format came as solution to that and it is fully supported by modules like GD, so that's no problem. The .jpg fileformat has just other applications, it's more suitable for photos.

There is no 'better' involved in the choice between gif and png, it just has to do with the licensing issues of the LZH algorithm in gif, which isn't an issue in .png

Jouke Visser, Perl 'Adept'
Using Perl to help the disabled: pVoice and pStory
  • Comment on Re: Which graphics format can Perl alter easier and more?

Replies are listed 'Best First'.
Re: Re: Which graphics format can Perl alter easier and more?
by Masem (Monsignor) on Aug 12, 2001 at 17:50 UTC
    Do be aware that GD is only able to handle 8-bits of color, and will 'posterize' (reduce the colors) of any higher-color image. For some cases, this may be acceptable, but is typically not the norm.

    If you need better color support, you'll probably have to go with a module like Image::Magick that uses the ImageMagick library to support nearly all popular formats and 24-bit+ color.

    I do wonder, now that I think about it, on the usefulness of a perl mod to handle 'object-oriented' raster imaging, similar to how the Macintosh PICT format is handled; objects would be stored nicely in XML until the need to be render is needed, and then backend off something like Image::Magick to actually do the generation.

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

      I used GD just as an example. It's one of the available graphics manipulation modules for Perl, just to explain that there is no graphical fileformat that Perl handles better or worse.

      Jouke Visser, Perl 'Adept'
      Using Perl to help the disabled: pVoice and pStory
      Ok, so would Image::Magick also support altering the appearance of .jpgs as well? I am interested in being able to alter the look of .jpgs besides .pngs also.

      Is there a way to do this?

      Andy Summers
Re: Re: Which graphics format can Perl alter easier and more?
by IraTarball (Monk) on Aug 12, 2001 at 18:31 UTC
    I'm not a graphics enthusiast but I seem to remember reading that the png format supported things that gif doesn't offer, like 32 bit true color and semi-transparency. I think there's a bit more to it than licensing issues. I did a quick read through the faq on the png site which looks like a good stop for anyone wanting some real details.

    Hey... it even looks like Oreilly has a book out on the png format if you're into that sort of thing.

    Ira,

    "So... What do all these little arrows mean?"
    ~unknown

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://104237]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2019-08-21 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?