Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSImageMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Drawing MBS CocoaBase Plugin 7.2 Yes No No Yes, macOS only No
Function: An NSImage object is a high-level class for manipulating image data.
Notes:
You use this class to load existing images or create new ones and composite them into a view or other image. This class works in conjunction with one or more image representation objects (subclasses of NSImageRep), which manage the actual image data.

All methods in this class will catch exceptions from Cocoa and raise a NSExceptionMBS instead. Using the message, name and reason properties you can see what was the reason for this exception. Please report if you find a method which does not handle exceptions correct.

Feedback, Comments & Corrections

Image Cache Modes

Constant Value Description
NSImageCacheAlways 1 Always generate a cache when drawing.
NSImageCacheBySize 2 Cache if cache size is smaller than the original data.
NSImageCacheDefault 0 Caching is unspecified.
Use the image rep's default.
NSImageCacheNever 3 Never cache; always draw direct.

Image Load Status

Constant Value Description
NSImageLoadStatusCancelled 1 Image loading was canceled.
The image contains the portions of the data that have already been successfully decompressed, if any.
NSImageLoadStatusCompleted 0 Enough data has been provided to completely decompress the image.
NSImageLoadStatusInvalidData 2 An error occurred during image decompression.
The image data is probably corrupt. The image contains the portions of the data that have already been successfully decompressed, if any.
NSImageLoadStatusReadError 4 Not enough data was available for full decompression of the image.
The image contains the portions of the data that have already been successfully decompressed, if any.
NSImageLoadStatusUnexpectedEOF 3 Not enough data was available for full decompression of the image.
The image contains the portions of the data that have already been successfully decompressed, if any.

This class has no sub classes.

Some useful global functions for this class:

Some methods using this class:

Some properties using for this class:

Some events for this class:

Some examples which use this class:


The items on this page are in the following plugins: MBS CocoaBase Plugin.


NSImageCellMBS   -   NSImageRepMBS




Links
MBS Xojo Plugins