Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGImageSourceMBS class.

Previous items Next items

CGImageSourceMBS.kCGImagePropertyPixelWidth as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for the properties dictionary.
Example
// open an image file
Var path as string = "/Library/Desktop Pictures/Galaxy.jpg"
Var f as FolderItem = GetFolderItem(path, FolderItem.PathTypeNative)
Var c As New CGImageSourceMBS(f)

// properties for first image
Var p as Dictionary = c.PropertiesAtIndex(0)
Var w as Integer = p.Value(c.kCGImagePropertyPixelWidth)
Var h as Integer = p.Value(c.kCGImagePropertyPixelHeight)

// show size
MsgBox str(w)+" x "+str(h)

The number of pixels in the x dimension. If present, this key is a CFNumber value.

CGImageSourceMBS.kCGImagePropertyPNGAuthor as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

The content is a string that identifies the author of the image.
Available in OS X v10.7 and later.

CGImageSourceMBS.kCGImagePropertyPNGChromaticities as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Portable Network Graphics (PNG) format.

The chromaticities.

CGImageSourceMBS.kCGImagePropertyPNGComment as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyPNGCompressionFilter as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyPNGCopyright as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

The content is a string that identifies the copyright of the image.
Available in OS X v10.7 and later.

CGImageSourceMBS.kCGImagePropertyPNGCreationTime as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

The content is a string that identifies the date and time the image was created.
Available in OS X v10.7 and later.

CGImageSourceMBS.kCGImagePropertyPNGDescription as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

The content is a string that describes the image.
Available in OS X v10.7 and later.

CGImageSourceMBS.kCGImagePropertyPNGDictionary as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for the properties dictionary.

A dictionary of key-value pairs for an image that uses Portable Network Graphics (PNG) format.

CGImageSourceMBS.kCGImagePropertyPNGDisclaimer as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyPNGGamma as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Portable Network Graphics (PNG) format.

The gamma value.

CGImageSourceMBS.kCGImagePropertyPNGInterlaceType as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Portable Network Graphics (PNG) format.

The interlace type.

CGImageSourceMBS.kCGImagePropertyPNGModificationTime as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

The content is a string that identifies the last date and time the image was modified.
Available in OS X v10.7 and later.

CGImageSourceMBS.kCGImagePropertyPNGPixelsAspectRatio as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyPNGSoftware as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

The content is a string that identifies the software used to create the image.
Available in OS X v10.7 and later.

CGImageSourceMBS.kCGImagePropertyPNGSource as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyPNGsRGBIntent as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Portable Network Graphics (PNG) format.

The sRGB intent.

CGImageSourceMBS.kCGImagePropertyPNGTitle as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

The content is a string that holds the image's title.
Available in OS X v10.7 and later.

CGImageSourceMBS.kCGImagePropertyPNGTransparency as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyPNGWarning as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyPNGXPixelsPerMeter as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Portable Network Graphics (PNG) format.

The number of x pixels per meter.

CGImageSourceMBS.kCGImagePropertyPNGYPixelsPerMeter as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Portable Network Graphics (PNG) format.

The number of y pixels per meter.

CGImageSourceMBS.kCGImagePropertyPrimaryImage as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyProfileName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for the properties dictionary.

The name of the optional ICC profile embedded in the image, if known. If present, the value of this key is a CFStringRef.

CGImageSourceMBS.kCGImagePropertyRawDictionary as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for the properties dictionary.

A dictionary of key-value pairs for an image that contains minimally processed, or raw, data.

CGImageSourceMBS.kCGImagePropertyTGACompression as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyTGADictionary as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyThumbnailImages as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyTIFFArtist as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The artist.

CGImageSourceMBS.kCGImagePropertyTIFFCompression as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The compression scheme used on the image data.

CGImageSourceMBS.kCGImagePropertyTIFFCopyright as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

Copyright information.

CGImageSourceMBS.kCGImagePropertyTIFFDateTime as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The date and time.

CGImageSourceMBS.kCGImagePropertyTIFFDictionary as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the keys for the properties dictionary.
Example
// Change rotation in an image file

// files
Var dpath as folderitem = SpecialFolder.Desktop.Child("test.jpg")
Var opath as folderitem = dpath.parent.Child("output.jpg")

// open source
Var imageSource as new cgimagesourcembs(dpath)

// read image
Var img as cgimagembs = imageSource.createimageatindex(0)

// global properties
Var globalprop as dictionary = imageSource.properties
// per image properties
Var p as Dictionary = imageSource.PropertiesAtIndex(0)

Var imageDest as new CGImageDestinationMBS(opath,"public.jpeg",1)

'const orientation = 1 // top left
const orientation = 3 // bottom right

// set globals
imageDest.SetProperties(globalprop)

// now set new orientation
p.value(imageDest.kCGImageDestinationOrientation) = orientation
p.value(imageDest.kCGImageDestinationMergeMetadata) = true

// change tiff dictionary, if present
Var dTIFF as Dictionary = p.lookup(imageSource.kCGImagePropertyTIFFDictionary, nil)
if dTIFF <> nil then
dTIFF.value(imageSource.kCGImagePropertyTIFFOrientation) = orientation
end if

// change iptc dictionary, if present
Var dIPTC as Dictionary = p.lookup(imageSource.kCGImagePropertyIPTCDictionary, nil)
if dIPTC <> nil then
dIPTC.value(imageSource.kCGImagePropertyIPTCImageOrientation) = orientation
end if

// write out image
imageDest.AddImage(img,p)
call imageDest.Finalize

A dictionary of key-value pairs for an image that uses Tagged Image File Format (TIFF).

CGImageSourceMBS.kCGImagePropertyTIFFDocumentName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The document name.

CGImageSourceMBS.kCGImagePropertyTIFFHostComputer as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The computer or operating system used when the image was created.

CGImageSourceMBS.kCGImagePropertyTIFFImageDescription as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The image description.

CGImageSourceMBS.kCGImagePropertyTIFFMake as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The camera or input device make.

CGImageSourceMBS.kCGImagePropertyTIFFModel as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

A camera or input device model.

CGImageSourceMBS.kCGImagePropertyTIFFOrientation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).
Example
// Change rotation in an image file

// files
Var dpath as folderitem = SpecialFolder.Desktop.Child("test.jpg")
Var opath as folderitem = dpath.parent.Child("output.jpg")

// open source
Var imageSource as new cgimagesourcembs(dpath)

// read image
Var img as cgimagembs = imageSource.createimageatindex(0)

// global properties
Var globalprop as dictionary = imageSource.properties
// per image properties
Var p as Dictionary = imageSource.PropertiesAtIndex(0)

Var imageDest as new CGImageDestinationMBS(opath,"public.jpeg",1)

'const orientation = 1 // top left
const orientation = 3 // bottom right

// set globals
imageDest.SetProperties(globalprop)

// now set new orientation
p.value(imageDest.kCGImageDestinationOrientation) = orientation
p.value(imageDest.kCGImageDestinationMergeMetadata) = true

// change tiff dictionary, if present
Var dTIFF as Dictionary = p.lookup(imageSource.kCGImagePropertyTIFFDictionary, nil)
if dTIFF <> nil then
dTIFF.value(imageSource.kCGImagePropertyTIFFOrientation) = orientation
end if

// change iptc dictionary, if present
Var dIPTC as Dictionary = p.lookup(imageSource.kCGImagePropertyIPTCDictionary, nil)
if dIPTC <> nil then
dIPTC.value(imageSource.kCGImagePropertyIPTCImageOrientation) = orientation
end if

// write out image
imageDest.AddImage(img,p)
call imageDest.Finalize

The image orientation.

CGImageSourceMBS.kCGImagePropertyTIFFPhotometricInterpretation as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The color space of the image data.

CGImageSourceMBS.kCGImagePropertyTIFFPrimaryChromaticities as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The chromaticities of the primaries of the image.

CGImageSourceMBS.kCGImagePropertyTIFFResolutionUnit as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The units of resolution.

CGImageSourceMBS.kCGImagePropertyTIFFSoftware as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The name and version of the software used for image creation.

CGImageSourceMBS.kCGImagePropertyTIFFTileLength as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyTIFFTileWidth as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyTIFFTransferFunction as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The transfer function, in tabular format, used to map pixel components from a nonlinear form into a linear form.

CGImageSourceMBS.kCGImagePropertyTIFFWhitePoint as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The white point.

CGImageSourceMBS.kCGImagePropertyTIFFXPosition as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

CGImageSourceMBS.kCGImagePropertyTIFFXResolution as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Keys for an image that uses Tagged Image File Format (TIFF).

The number of pixels per resolution unit in the image width direction.

CGImageSourceMBS.kCGImagePropertyTIFFYPosition as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the key names for the properties.

Previous items Next items

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


The biggest plugin in space...