Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q4004 What is MemoryImageSource?

You are here: irt.org | FAQ | Java | Q4004 [ previous next ]

MemoryImageSource is an image producer class that creates a new Image object from an array of integers, the most common syntax (constructor) is:

MemoryImageSource(int width, int height, int pixel[], int offset, int scanLineWidth)

For Example if we have an array of 64 integers called pixels and we want to create an 8x8 Image we would write:

img = CreateImage(new MemoryImageSource(8, 8, pixels, 0, 8));

©2018 Martin Webb