How to save a Image?

About Monkey 2 Forums Monkey 2 Programming Help How to save a Image?

Tagged: 

This topic contains 4 replies, has 4 voices, and was last updated by  nerobot 1 year, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9386

    Ratchet
    Participant

    If I loaded a PNG file into a Image, how to save that Image back into a PNG file?

    #9387

    scurty
    Participant

    I think you have to load the image into a pixelmap first; then convert it to a new image instance. Next, change the pixelmap if you need to, use “pixelmapVar.Save(“path.png”)” to save the pixelmap as a png.
    Example:

    #9390

    TomToad
    Participant

    Don’t know if this is the best way, but it works. MyImage is the image you wish to save, and savefile is the name of the png file to be saved.

    #9428

    Ratchet
    Participant

    Great, thanks a lot 🙂

    #11797

    nerobot
    Participant

    I like extensions, and here is one more candidate:  🙂

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.