Guide Apple image decoding, encoding, metadata, thumbnails, multi-frame sources, and representation bridging across Image I/O, Core Graphics, AppKit NSImage and NSImageRep, UIKit UIImage, Core Image, and Core Video. Use when image work involves files, data, representations, orientation, scale, color, metadata, or conversion rather than pixel effects or visual recognition.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Guide Apple image decoding, encoding, metadata, thumbnails, multi-frame sources, and representation bridging across Image I/O, Core Graphics, AppKit NSImage and NSImageRep, UIKit UIImage, Core Image, and Core Video. Use when image work involves files, data, representations, orientation, scale, color, metadata, or conversion rather than pixel effects or visual recognition.
Apple Image Representation Workflow
Purpose
Guide image source, destination, representation, and conversion work without flattening distinct Apple image types into a generic wrapper. Keep file encoding, rendered pixels, processing recipes, platform display containers, metadata, and auxiliary images visibly separate.
When To Use
Use for Image I/O sources and destinations, metadata, thumbnails, incremental loading, multi-frame images, CGImage, NSImage, NSImageRep, NSBitmapImageRep, UIImage, and representation conversion.
Recommend core-image-processing-workflow when filters, compositing, RAW development, custom kernels, or rendering are primary.
Recommend the Vision workflow when the requested outcome is recognition or analysis rather than representation ownership.
Single-Path Workflow
Classify the request:
source inspection or decoding
incremental loading or thumbnailing
metadata or auxiliary data
destination encoding or multi-frame output
Core Graphics raster ownership
AppKit representation or drawing
UIKit image display ownership
conversion or repair
Apply the Apple docs gate:
read current Image I/O, Core Graphics, AppKit, or UIKit documentation first
state the documented behavior relied on
check API, image-format, auxiliary-data, and platform availability before promising a decode, encode, or representation path
use references/image-io-decoding-encoding-and-metadata.md for source and destination work
use references/apple-image-representations-and-bridging.md for type selection and conversion
Preserve source meaning:
inspect type, frame count, dimensions, properties, orientation, color profile, alpha, dynamic range, and auxiliary data before conversion
choose decode-time thumbnailing or incremental loading when the workload requires it
identify whether metadata and original encoded bytes must survive
Choose the representation:
CGImage for concrete raster pixels and Core Graphics drawing
CIImage for a lazy processing graph
NSImage and NSImageRep for macOS display-oriented multi-representation behavior
UIImage for UIKit display semantics including scale and orientation
CVPixelBuffer for frame-oriented media and hardware interop
Encode deliberately:
choose destination type, frame count, properties, metadata policy, orientation policy, color profile, compression, and auxiliary-data policy
add every image or frame
require successful CGImageDestinationFinalize before claiming output exists
Return one recommendation with source facts, chosen types, conversion losses, decode/encode plan, memory and cancellation policy, diagnostics, and validation.
Inputs
request: image representation, decode, encode, metadata, or conversion task.