in reply to png to bmp 24

Hey thanks, I did notice that but could never get the code right. Can you give me a sample using my code? Thanks a bunch!!

Replies are listed 'Best First'.
Re: Re: png to bmp 24
by Anonymous Monk on Apr 03, 2004 at 03:55 UTC
    Sorry to keep bothering you guys but the following two code snipets didnt work for me. It still make a very small files. Do either of you have some working code to help me get out of this mess?
    $file="c:/web/bcimages/$ID.png"; $file1="c:/web/bcimages/$ID.bmp"; my($image, $x); $image = Image::Magick->new; $x = $image->Read($file); warn "$x" if "$x"; $image->Set(depth=>8); $x = $image->Write($file1); warn "$x" if "$x";
    or
    $file="c:/web/bcimages/$ID.png"; $file1="c:/web/bcimages/$ID.bmp"; my($image, $x); $image = Image::Magick->new; $image->Set(depth=>8); $x = $image->Read($file); warn "$x" if "$x"; $x = $image->Write($file1); warn "$x" if "$x";

    jantiored by ybiC: Balanced <code> tags around codeblocks

      Well, working code is the one thing you're not getting from me. This is all from memory (and looking at the docs). I don't have a working ImageMagick install right now, nor the time to get one running.

      Anyhow the first code sample looks like what I would try. It's very odd that it is not working! I'm sure it has worked for me in the past.

      Anyhow I'd definitely try John's suggestion of the command line tools. Then possibly try converting some other pngs, some jpgs. Just start narrowing down the problem. Something has to work. ImageMagick has been very good to me in the past.

      PS. Some 'code' tags would make this much more readable.
        OK guys you have been really patient with me and thanks for that. I was able to get the file into acrobate which is fine. It is in the center of the page. How do I control what position on the pdf the image is. How can I get it into the upper left corner?