Jump to content




Loading Bitmap images. (BMP)

utility

  • You cannot reply to this topic
4 replies to this topic

#1 Mads

  • Members
  • 604 posts
  • LocationCopenhagen, Denmark

Posted 13 February 2013 - 01:50 AM

This "API" allows you to load BMP images with one function call. This means that you can use images that you created in your favorite image editor, without any conversion. It returns an image which can be used in the paint program, and can be used with the paintutils API.

To get it, copy this code:
Spoiler

Or use this command:
pastebin get VT4gS3Ja bmploader

Then load the API with
os.loadAPI("bmploader")

Usage:
bmploader.loadBitmap(path:string) -- Returns the image.

NOTE: All images MUST be 24-bit.

When making the images, remember to keep inside atleast +-10 of the RGB values, which you can see here:
Posted Image

Here is a test image:
pastebin get r9FNQYUF test.bmp

Please leave some feedback!

EDIT: Apparently Pastebin doesn't like keeping the right format, so you will have to use a reliable source for downloading the images, or make them yourself.

#2 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 13 February 2013 - 04:14 AM

Very nice!

#3 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 13 February 2013 - 04:22 AM

could you make a bitmap saver?

#4 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 13 February 2013 - 04:23 AM

Great work! Though I'm only a little disapproving of this hardcore fourth wall destruction. :P

#5 Mads

  • Members
  • 604 posts
  • LocationCopenhagen, Denmark

Posted 13 February 2013 - 05:30 AM

View PostPixelToast, on 13 February 2013 - 04:22 AM, said:

could you make a bitmap saver?

I suppose yes. I'll start working on that, I just have to look into it abit more.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users