in reply to Re: jpg to bmp in Windows
in thread jpg to bmp in Windows

Why does this only work with 400x300pix images?
I have a 600x240 image. The bmp will be created, but i can't look at it nor use it.
Do i have to change some of these lines to work correctly?

Replies are listed 'Best First'.
Re^3: jpg to bmp in Windows
by BrowserUk (Patriarch) on Sep 02, 2008 at 16:09 UTC

    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.