Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

If you use

$image = GD::Image->new($filename)

It will work out what type of image it is for itself--modulo those types it supports. A quick look at the docs didn't reveal any mention of .tiff though. .png is my preference anyway, as it compresses very well without any artifacts or side effects other than taking a few more milliseconds to load.

By way of example:

  • A 66 MB 6600x3400 24-bit tiff containing 1565866 colours, which takes 1/3rd of a second to load.
  • Saved as a 24-bit .png with maximum compression reduces to 44 MB.

    Still contains 1565866 colours and shows no signs of of any artifacts even at 500% magnification. but it takes 3 seconds to load (and decompress).

  • Saved as a 24-bit .jpg at 'best' quality, it reduces to 20 MB.

    But now only contains 650125 colours, shows clear signs of the lossy algorithm even at modest magnifications and still takes 2 seconds to load (and decompress).


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^10: Perl Image Analysis by BrowserUk
in thread Perl Image Analysis by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (12)
As of 2024-04-16 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found