Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q4004 What is MemoryImageSource?

irt.org | Knowledge Base | Java | Q4004 [ previous next ]

Q4004 What is MemoryImageSource?

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));

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.