Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: png to bmp 24

by Anonymous Monk
on Apr 03, 2004 at 00:05 UTC ( [id://342193]=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-26 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found