There are no size limitations with the code. I just ran it on the biggest .jpg I had kicking around and it ran fine. Slow, but fine:

c:\test\img\tmp>imageinfo --verbose worldx2-2.jpg worldx2-2.jpg File format: JPEG MIME type: image/jpeg Width (pixels): 5400 Height (pixels): 2700 Bits per pixel: 24 Number of images: 1 Physical width (dpi): 72 Physical height (dpi): 72 Physical width (inches): 75 Physical height (inches): 37.500000 Number of textual comments: 0 c:\test\img\tmp>..\..\Jpg2bmp.pl worldx2-2.jpg c:\test\img\tmp>imageinfo --verbose worldx2-2.bmp worldx2-2.bmp File format: BMP MIME type: image/bmp Width (pixels): 5400 Height (pixels): 2700 Bits per pixel: 24 Number of images: 1 Physical width (dpi): 300 Physical height (dpi): 300 Physical width (inches): 18 Physical height (inches): 9 Number of textual comments: 0

However, as noted above, it does only work for 24-bit images! I've updated the node with a slightly modified version that will abort if the image is not 24-bit.

It could be modified to handle palette images but it is a fair amount of work and there are far better (faster & more comprehensive) tools out there for performing image conversions.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^3: jpg to bmp in Windows by BrowserUk
in thread jpg to bmp in Windows by rochlin

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.