<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIImage",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIImage"
  },
  "title" : "UIImage"
}
-->

# UIImage

An object that manages image data in your app.

```
class UIImage
```

## Overview

You use image objects to represent image data of all kinds, and the [`UIImage`](/documentation/UIKit/UIImage) class is capable of managing data for all image formats supported by the underlying platform. Image objects are immutable, so you always create them from existing image data, such as an image file on disk or programmatically created image data. An image object may contain a single image or a sequence of images for use in an animation.

You can use image objects in several different ways:

- Assign an image to a [`UIImageView`](/documentation/UIKit/UIImageView) object to display the image in your interface.
- Use an image to customize system controls such as buttons, sliders, and segmented controls.
- Draw an image directly into a view or other graphics context.
- Pass an image to other APIs that might require image data.

Although image objects support all platform-native image formats, it’s recommended that you use PNG or JPEG files for most images in your app. Image objects are optimized for reading and displaying both formats, and those formats offer better performance than most other image formats. Because the PNG format is lossless, it’s especially recommended for the images you use in your app’s interface.

### Create image objects

When creating image objects using the methods of this class, you must have existing image data located in a file or data structure. You can’t create an empty image and draw content into it. There are many options for creating image objects, each of which is best for specific situations:

- Use the [`init(named:in:compatibleWith:)`](/documentation/UIKit/UIImage/init(named:in:compatibleWith:)) method (or the [`init(named:)`](/documentation/UIKit/UIImage/init(named:)) method) to create an image from an image asset or image file located in your app’s main bundle (or some other known bundle). Because these methods cache the image data automatically, they’re especially recommended for images that you use frequently.
- Use the [`imageWithContentsOfFile:`](/documentation/UIKit/UIImage/imageWithContentsOfFile:) or [`init(contentsOfFile:)`](/documentation/UIKit/UIImage/init(contentsOfFile:)) method to create an image object where the initial data isn’t in a bundle. These methods load the image data from disk each time, so don’t use them to load the same image repeatedly.
- Use the [`animatedImage(with:duration:)`](/documentation/UIKit/UIImage/animatedImage(with:duration:)) and [`animatedImageNamed(_:duration:)`](/documentation/UIKit/UIImage/animatedImageNamed(_:duration:)) methods to create a single [`UIImage`](/documentation/UIKit/UIImage) object comprised of multiple sequential images. Install the resulting image in a [`UIImageView`](/documentation/UIKit/UIImageView) object to create animations in your interface.

Other methods of the [`UIImage`](/documentation/UIKit/UIImage) class let you create animations from specific types of data, such as Core Graphics images or image data you create yourself. UIKit also provides the [`UIGraphicsGetImageFromCurrentImageContext()`](/documentation/UIKit/UIGraphicsGetImageFromCurrentImageContext()) function to create images from content you draw yourself. You use that function in conjunction with a bitmap-based graphics context, which you use to capture your drawing commands.

> Note:
> Because image objects are immutable, you can’t change their properties after creation. Most image properties are set automatically using metadata in the accompanying image file or image data. The immutable nature of image objects also means they’re safe to create and use from any thread.

Image assets are the easiest way to manage the images that ship with your app. Each new Xcode project contains an assets library, to which you can add multiple image sets. An image set contains the variations of a single image that your app uses. A single image set can provide different versions of an image for different platforms, for different trait environments (compact or regular), and for different scale factors.

In addition to loading images from disk, you can ask the user to supply images from an available camera or photo library using a [`UIImagePickerController`](/documentation/UIKit/UIImagePickerController) object. An image picker displays a custom user interface for selecting images. Accessing user-supplied images requires explicit user permission. For more information about using an image picker, see [`UIImagePickerController`](/documentation/UIKit/UIImagePickerController).

### Define a stretchable image

A stretchable image is one that defines regions where you can duplicate the underlying image data in an aesthetically pleasing way. Stretchable images are commonly used to create backgrounds that can grow or shrink to fill the available space.

Define a stretchable image by adding insets to an existing image using the [`resizableImage(withCapInsets:)`](/documentation/UIKit/UIImage/resizableImage(withCapInsets:)) or [`resizableImage(withCapInsets:resizingMode:)`](/documentation/UIKit/UIImage/resizableImage(withCapInsets:resizingMode:)) method. The insets subdivide the image into two or more parts. Specifying nonzero values for each inset yields an image divided into nine parts, as shown in the following image:

![An image that depicts how to use insets to define stretchable regions. The image on the left is stretched and shows Left, Right, Top, and Bottom insets. The image on the right is condensed and also shows Left, Right, Top, and Bottom insets.](images/com.apple.uikit/media-1965929@2x.png)

Each inset defines the portion of the image that doesn’t stretch in the given dimension. The regions inside an image’s top and bottom insets maintain a fixed height, and the areas inside the left and right insets maintain a fixed width. The following image shows how each part of a nine-part image stretches as the image itself is stretched to fill the available space. The corners of the image don’t change size because they’re inside both a horizontal and vertical inset:

![An image that depicts the stretchable portions of a nine-part image. The image on the left is stretched. The image on the right is condensed. The corners of both images remain the same size.](images/com.apple.uikit/media-1965930@2x.png)

### Compare images

The <doc://com.apple.documentation/documentation/ObjectiveC/NSObjectProtocol/isEqual(_:)> method is the only reliable way to determine whether two image objects contain the same image data. The following code illustrates the correct and incorrect ways to compare images.

```swift
// Load the same image twice.
let image1 = UIImage(named: "MyImage")
let image2 = UIImage(named: "MyImage") 

// The image objects may be different, but the contents are still equal.
if image1 != nil && image1!.isEqual(image2) {
    // Correct. This technique compares the image data correctly.
} 
if image1 == image2 {
    // Incorrect! Direct object comparisons may not work.
}
```

### Access the image data

Image objects don’t provide direct access to their underlying image data. However, you can retrieve the image data in other formats for use in your app. Specifically, you can use the [`cgImage`](/documentation/UIKit/UIImage/cgImage) and [`ciImage`](/documentation/UIKit/UIImage/ciImage) properties to retrieve versions of the image that are compatible with Core Graphics and Core Image, respectively. You can also use the [`pngData()`](/documentation/UIKit/UIImage/pngData()) and [`jpegData(compressionQuality:)`](/documentation/UIKit/UIImage/jpegData(compressionQuality:)) functions to generate an <doc://com.apple.documentation/documentation/Foundation/NSData> object containing the image data in either the PNG or JPEG format.

## Topics

### Loading and caching images

[Providing images for different appearances](/documentation/UIKit/providing-images-for-different-appearances)

Supply image resources appropriate for light and dark appearances and for high-contrast environments.

[Configuring and displaying symbol images in your UI](/documentation/UIKit/configuring-and-displaying-symbol-images-in-your-ui)

Create scalable images that integrate with your app’s text, and adjust the appearance of those images dynamically.

  <doc://com.apple.documentation/documentation/TechnologyOverviews/custom-sf-symbols>

[`init?(named: String, in: Bundle?, compatibleWith: UITraitCollection?)`](/documentation/UIKit/UIImage/init(named:in:compatibleWith:))

Creates an image object using the named image asset that’s compatible with the specified trait collection.

[`init?(named: String, in: Bundle?, with: UIImage.Configuration?)`](/documentation/UIKit/UIImage/init(named:in:with:))

Creates an image by using the named image asset that’s compatible with the configuration you specify.

[`convenience init?(named: String, in: Bundle?, variableValue: Double, configuration: UIImage.Configuration?)`](/documentation/UIKit/UIImage/init(named:in:variableValue:configuration:))

Creates an image by using the name, configuration, and variable value you specify.

[`+ (UIImage *) imageNamed:(NSString *) name inBundle:(NSBundle *) bundle variableValue:(double) value withConfiguration:(UIImageConfiguration *) configuration;`](/documentation/UIKit/UIImage/imageNamed:inBundle:variableValue:withConfiguration:)

Creates an image by using the name, configuration, and variable value you specify.

[`init?(named: String)`](/documentation/UIKit/UIImage/init(named:))

Creates an image object from the specified named asset.

[`convenience init(imageLiteralResourceName: String)`](/documentation/UIKit/UIImage/init(imageLiteralResourceName:))

Returns the image object for the specified resource.

[`init?(systemName: String, withConfiguration: UIImage.Configuration?)`](/documentation/UIKit/UIImage/init(systemName:withConfiguration:))

Creates an image object that contains a system symbol image with the specified configuration.

[`convenience init?(systemName: String, variableValue: Double, configuration: UIImage.Configuration?)`](/documentation/UIKit/UIImage/init(systemName:variableValue:configuration:))

Creates an image object that contains a system symbol image with the configuration and variable value you specify.

[`+ (UIImage *) systemImageNamed:(NSString *) name variableValue:(double) value withConfiguration:(UIImageConfiguration *) configuration;`](/documentation/UIKit/UIImage/systemImageNamed:variableValue:withConfiguration:)

Creates an image object that contains a system symbol image with the configuration and variable value you specify.

[`init?(systemName: String, compatibleWith: UITraitCollection?)`](/documentation/UIKit/UIImage/init(systemName:compatibleWith:))

Creates an image object that contains a system symbol image appropriate for the specified traits.

[`init?(systemName: String)`](/documentation/UIKit/UIImage/init(systemName:))

Creates an image object that contains a system symbol image.

[`convenience init(resource: ImageResource)`](/documentation/UIKit/UIImage/init(resource:))

[Building high-performance lists and collection views](/documentation/UIKit/building-high-performance-lists-and-collection-views)

Improve the performance of lists and collections in your app with prefetching and image preparation.

### Loading images for display

[`func preparingForDisplay() -> UIImage?`](/documentation/UIKit/UIImage/preparingForDisplay())

Decodes an image synchronously and provides a new one for display in views and animations.

[`func prepareForDisplay(completionHandler: (UIImage?) -> Void)`](/documentation/UIKit/UIImage/prepareForDisplay(completionHandler:))

Decodes an image asynchronously and provides a new one for display in views and animations.

[`func preparingThumbnail(of: CGSize) -> UIImage?`](/documentation/UIKit/UIImage/preparingThumbnail(of:))

Returns a new thumbnail image at the specified size.

[`func prepareThumbnail(of: CGSize, completionHandler: (UIImage?) -> Void)`](/documentation/UIKit/UIImage/prepareThumbnail(of:completionHandler:))

Creates a thumbnail image at the specified size asynchronously on a background thread.

### Creating and initializing image objects

[`+ (UIImage *) imageWithContentsOfFile:(NSString *) path;`](/documentation/UIKit/UIImage/imageWithContentsOfFile:)

Creates and returns an image object by loading the image data from the file at the specified path.

[`+ (UIImage *) imageWithData:(NSData *) data;`](/documentation/UIKit/UIImage/imageWithData:)

Creates and returns an image object that uses the specified image data.

[`+ (UIImage *) imageWithData:(NSData *) data scale:(CGFloat) scale;`](/documentation/UIKit/UIImage/imageWithData:scale:)

Creates and returns an image object that uses the specified image data and scale factor.

[`+ (UIImage *) imageWithCGImage:(CGImageRef) cgImage;`](/documentation/UIKit/UIImage/imageWithCGImage:)

Creates and returns an image object representing the specified Quartz image.

[`+ (UIImage *) imageWithCGImage:(CGImageRef) cgImage scale:(CGFloat) scale orientation:(UIImageOrientation) orientation;`](/documentation/UIKit/UIImage/imageWithCGImage:scale:orientation:)

Creates and returns an image object with the specified scale and orientation factors.

[`+ (UIImage *) imageWithCIImage:(CIImage *) ciImage;`](/documentation/UIKit/UIImage/imageWithCIImage:)

Creates and returns an image object that contains a Core Image object.

[`+ (UIImage *) imageWithCIImage:(CIImage *) ciImage scale:(CGFloat) scale orientation:(UIImageOrientation) orientation;`](/documentation/UIKit/UIImage/imageWithCIImage:scale:orientation:)

Creates and returns an image object based on a Core Image object and the specified attributes.

[`init?(contentsOfFile: String)`](/documentation/UIKit/UIImage/init(contentsOfFile:))

Initializes and returns the image object with the contents of the specified file.

[`init?(data: Data)`](/documentation/UIKit/UIImage/init(data:))

Initializes and returns the image object with the specified data.

[`init?(data: Data, scale: CGFloat)`](/documentation/UIKit/UIImage/init(data:scale:))

Initializes and returns the image object with the specified data and scale factor.

[`init(cgImage: CGImage)`](/documentation/UIKit/UIImage/init(cgImage:)-14qlb)

Initializes and returns the image object with the specified Quartz image reference.

[`init(cgImage: CGImage, scale: CGFloat, orientation: UIImage.Orientation)`](/documentation/UIKit/UIImage/init(cgImage:scale:orientation:)-2ouhh)

Initializes and returns an image object with the specified scale and orientation factors.

[`init(ciImage: CIImage)`](/documentation/UIKit/UIImage/init(ciImage:)-93vu1)

Initializes and returns an image object with the specified Core Image object.

[`init(ciImage: CIImage, scale: CGFloat, orientation: UIImage.Orientation)`](/documentation/UIKit/UIImage/init(ciImage:scale:orientation:)-9gpyn)

Initializes and returns an image object with the specified Core Image object and properties.

[`struct UIImageReader`](/documentation/UIKit/UIImageReader-swift.struct)

[`@interface UIImageReader : NSObject`](/documentation/UIKit/UIImageReader-c.class)

[`@interface UIImageReaderConfiguration : NSObject`](/documentation/UIKit/UIImageReaderConfiguration)

The properties that a reader uses to decode images.

### Creating animated images

[`class func animatedImageNamed(String, duration: TimeInterval) -> UIImage?`](/documentation/UIKit/UIImage/animatedImageNamed(_:duration:))

Creates and returns an animated image.

[`class func animatedImage(with: [UIImage], duration: TimeInterval) -> UIImage?`](/documentation/UIKit/UIImage/animatedImage(with:duration:))

Creates and returns an animated image from an existing set of images.

[`class func animatedResizableImageNamed(String, capInsets: UIEdgeInsets, duration: TimeInterval) -> UIImage?`](/documentation/UIKit/UIImage/animatedResizableImageNamed(_:capInsets:duration:))

Creates and returns an animated image with end caps.

[`class func animatedResizableImageNamed(String, capInsets: UIEdgeInsets, resizingMode: UIImage.ResizingMode, duration: TimeInterval) -> UIImage?`](/documentation/UIKit/UIImage/animatedResizableImageNamed(_:capInsets:resizingMode:duration:))

Creates and returns an animated image with end caps and a specific resizing mode.

### Changing the image attributes

[`func withConfiguration(UIImage.Configuration) -> UIImage`](/documentation/UIKit/UIImage/withConfiguration(_:))

Returns a new version of the current image, replacing the current configuration attributes with the specified attributes.

[`func applyingSymbolConfiguration(UIImage.SymbolConfiguration) -> UIImage?`](/documentation/UIKit/UIImage/applyingSymbolConfiguration(_:))

Returns a new version of the current image, applying the specified configuration attributes on top of the current attributes.

[`func imageFlippedForRightToLeftLayoutDirection() -> UIImage`](/documentation/UIKit/UIImage/imageFlippedForRightToLeftLayoutDirection())

Returns a new version of the current image that flips horizontally when it’s in a right-to-left layout.

[`func withHorizontallyFlippedOrientation() -> UIImage`](/documentation/UIKit/UIImage/withHorizontallyFlippedOrientation())

Returns a new version of the image that’s a mirror of the original image.

[`func withRenderingMode(UIImage.RenderingMode) -> UIImage`](/documentation/UIKit/UIImage/withRenderingMode(_:))

Returns a new version of the image that uses the specified rendering mode.

[`func withAlignmentRectInsets(UIEdgeInsets) -> UIImage`](/documentation/UIKit/UIImage/withAlignmentRectInsets(_:))

Returns a new version of the image that uses the specified alignment insets.

[`func resizableImage(withCapInsets: UIEdgeInsets) -> UIImage`](/documentation/UIKit/UIImage/resizableImage(withCapInsets:))

Returns a new version of the image with the specified cap insets.

[`func resizableImage(withCapInsets: UIEdgeInsets, resizingMode: UIImage.ResizingMode) -> UIImage`](/documentation/UIKit/UIImage/resizableImage(withCapInsets:resizingMode:))

Returns a new version of the image with the specified cap insets and options.

[`func imageWithoutBaseline() -> UIImage`](/documentation/UIKit/UIImage/imageWithoutBaseline())

Creates a copy of the current image object without any baseline information.

[`func withBaselineOffset(fromBottom: CGFloat) -> UIImage`](/documentation/UIKit/UIImage/withBaselineOffset(fromBottom:))

Creates a new image with a baseline at the specified offset from the bottom of the image.

[`class Configuration`](/documentation/UIKit/UIImage/Configuration-swift.class)

A configuration object that contains the traits that the system uses when selecting the current image variant.

[`class SymbolConfiguration`](/documentation/UIKit/UIImage/SymbolConfiguration-swift.class)

An object that contains the specific font, size, style, and weight attributes to apply to a symbol image.

### Getting standard system images

[`class var add: UIImage`](/documentation/UIKit/UIImage/add)

The standard image for indicating the addition of content.

[`class var remove: UIImage`](/documentation/UIKit/UIImage/remove)

The standard image for indicating the removal of content.

[`class var actions: UIImage`](/documentation/UIKit/UIImage/actions)

The standard image for indicating user-initiated actions.

[`class var checkmark: UIImage`](/documentation/UIKit/UIImage/checkmark)

The standard image for a checkmark on a filled-circle background.

[`class var strokedCheckmark: UIImage`](/documentation/UIKit/UIImage/strokedCheckmark)

The standard image for a checkmark on a tinted circle with a white-stroked border.

### Getting the image data

[`var cgImage: CGImage?`](/documentation/UIKit/UIImage/cgImage)

The underlying Quartz image data.

[`var ciImage: CIImage?`](/documentation/UIKit/UIImage/ciImage)

The underlying Core Image data.

[`var images: [UIImage]?`](/documentation/UIKit/UIImage/images)

The complete array of image objects that compose the animation of an animated object.

[`var imageAsset: UIImageAsset?`](/documentation/UIKit/UIImage/imageAsset)

The image asset (if any) for the image.

### Getting the image size and scale

[`var scale: CGFloat`](/documentation/UIKit/UIImage/scale)

The scale factor of the image.

[`var size: CGSize`](/documentation/UIKit/UIImage/size)

The logical dimensions, in points, for the image.

### Accessing image attributes

[`var imageOrientation: UIImage.Orientation`](/documentation/UIKit/UIImage/imageOrientation)

The orientation of the receiver’s image.

[`enum Orientation`](/documentation/UIKit/UIImage/Orientation)

Constants that specify the intended display orientation for an image.

[`var flipsForRightToLeftLayoutDirection: Bool`](/documentation/UIKit/UIImage/flipsForRightToLeftLayoutDirection)

A Boolean value that indicates whether the image flips in a right-to-left layout.

[`var resizingMode: UIImage.ResizingMode`](/documentation/UIKit/UIImage/resizingMode-swift.property)

The resizing mode of the image.

[`enum ResizingMode`](/documentation/UIKit/UIImage/ResizingMode-swift.enum)

Constants that specify the possible resizing modes for an image.

[`var duration: TimeInterval`](/documentation/UIKit/UIImage/duration)

The time interval for displaying an animated image.

[`var capInsets: UIEdgeInsets`](/documentation/UIKit/UIImage/capInsets)

The end-cap insets.

[`var alignmentRectInsets: UIEdgeInsets`](/documentation/UIKit/UIImage/alignmentRectInsets)

The alignment metadata for positioning the image during layout.

[`var isSymbolImage: Bool`](/documentation/UIKit/UIImage/isSymbolImage)

A Boolean value that indicates whether the image is a symbol.

### Getting the image configuration

[`var configuration: UIImage.Configuration?`](/documentation/UIKit/UIImage/configuration-swift.property)

The configuration details for the image.

[`var symbolConfiguration: UIImage.SymbolConfiguration?`](/documentation/UIKit/UIImage/symbolConfiguration-swift.property)

The configuration details for a symbol image.

[`var traitCollection: UITraitCollection`](/documentation/UIKit/UIImage/traitCollection)

The trait collection that describes the current variant of the image.

### Specifying the dynamic range

[`var isHighDynamicRange: Bool`](/documentation/UIKit/UIImage/isHighDynamicRange)

Indicates that this image is tagged for display of high dynamic range content.

[`func imageRestrictedToStandardDynamicRange() -> UIImage`](/documentation/UIKit/UIImage/imageRestrictedToStandardDynamicRange())

Returns a new image that will render within the standard range.

[`func heicData() -> Data?`](/documentation/UIKit/UIImage/heicData())

Returns HEIC data representing the image, or nil if such a representation could not be generated. HEIC is recommended for efficiently storing all kinds of images, including those with high dynamic range content.

[`enum DynamicRange`](/documentation/UIKit/UIImage/DynamicRange)

### Managing the baseline

[`var baselineOffsetFromBottom: CGFloat?`](/documentation/UIKit/UIImage/baselineOffsetFromBottom-3emg)

The position of the baseline relative to the bottom of the image.

[`@property (nonatomic, readonly) BOOL hasBaseline;`](/documentation/UIKit/UIImage/hasBaseline)

A Boolean value that indicates whether the image has a defined baseline offset.

[`@property (nonatomic, readonly) CGFloat baselineOffsetFromBottom;`](/documentation/UIKit/UIImage/baselineOffsetFromBottom-23gkf)

The position of the baseline relative to the bottom of the image.

### Getting rendering information

[`var renderingMode: UIImage.RenderingMode`](/documentation/UIKit/UIImage/renderingMode-swift.property)

A setting that determines how the app renders an image.

[`enum RenderingMode`](/documentation/UIKit/UIImage/RenderingMode-swift.enum)

Constants that specify the possible rendering modes for an image.

[`var imageRendererFormat: UIGraphicsImageRendererFormat`](/documentation/UIKit/UIImage/imageRendererFormat)

The preferred image renderer format for the image.

### Tinting the image

[`func withTintColor(UIColor) -> UIImage`](/documentation/UIKit/UIImage/withTintColor(_:))

Returns a new version of the current image with the specified tint color.

[`func withTintColor(UIColor, renderingMode: UIImage.RenderingMode) -> UIImage`](/documentation/UIKit/UIImage/withTintColor(_:renderingMode:))

Returns a new version of the image with a tint color that uses the specified rendering mode.

### Drawing images

[`func draw(at: CGPoint)`](/documentation/UIKit/UIImage/draw(at:))

Draws the image at the specified point in the current context.

[`func draw(at: CGPoint, blendMode: CGBlendMode, alpha: CGFloat)`](/documentation/UIKit/UIImage/draw(at:blendMode:alpha:))

Draws the entire image at the specified point using the custom compositing options.

[`func draw(in: CGRect)`](/documentation/UIKit/UIImage/draw(in:))

Draws the entire image in the specified rectangle, scaling it as necessary to fit.

[`func draw(in: CGRect, blendMode: CGBlendMode, alpha: CGFloat)`](/documentation/UIKit/UIImage/draw(in:blendMode:alpha:))

Draws the entire image in the specified rectangle using the specified compositing options.

[`func drawAsPattern(in: CGRect)`](/documentation/UIKit/UIImage/drawAsPattern(in:))

Draws a tiled Quartz pattern using the receiver’s contents as the tile pattern.

### Exporting standard bitmap formats

[`func jpegData(compressionQuality: CGFloat) -> Data?`](/documentation/UIKit/UIImage/jpegData(compressionQuality:))

Returns a data object that contains the image in JPEG format.

[`func pngData() -> Data?`](/documentation/UIKit/UIImage/pngData())

Returns a data object that contains the specified image in PNG format.

### Deprecated

[`func stretchableImage(withLeftCapWidth: Int, topCapHeight: Int) -> UIImage`](/documentation/UIKit/UIImage/stretchableImage(withLeftCapWidth:topCapHeight:))

Creates and returns a new image object with the specified cap values.

[`var leftCapWidth: Int`](/documentation/UIKit/UIImage/leftCapWidth)

The horizontal end-cap size.

[`var topCapHeight: Int`](/documentation/UIKit/UIImage/topCapHeight)

The vertical end-cap size.

### Initializers

[`init(CGImage: CGImage)`](/documentation/UIKit/UIImage/init(CGImage:)-8doi8)

[`init(CGImage: CGImage)`](/documentation/UIKit/UIImage/init(CGImage:)-g30x)

[`init(CGImage: CGImage, scale: CGFloat, orientation: UIImage.Orientation)`](/documentation/UIKit/UIImage/init(CGImage:scale:orientation:)-3mxey)

[`init(CGImage: CGImage, scale: CGFloat, orientation: UIImage.Orientation)`](/documentation/UIKit/UIImage/init(CGImage:scale:orientation:)-3xlco)

[`init(CIImage: CIImage)`](/documentation/UIKit/UIImage/init(CIImage:)-3kg9b)

[`init(CIImage: CIImage)`](/documentation/UIKit/UIImage/init(CIImage:)-8dq4u)

[`init(CIImage: CIImage, scale: CGFloat, orientation: UIImage.Orientation)`](/documentation/UIKit/UIImage/init(CIImage:scale:orientation:)-3742c)

[`init(CIImage: CIImage, scale: CGFloat, orientation: UIImage.Orientation)`](/documentation/UIKit/UIImage/init(CIImage:scale:orientation:)-wlzf)

[`init?(coder: NSCoder)`](/documentation/UIKit/UIImage/init(coder:))

[`init?(named: String, inBundle: Bundle?, compatibleWithTraitCollection: UITraitCollection?)`](/documentation/UIKit/UIImage/init(named:inBundle:compatibleWithTraitCollection:))

[`init?(named: String, inBundle: Bundle?, withConfiguration: UIImage.Configuration?)`](/documentation/UIKit/UIImage/init(named:inBundle:withConfiguration:))

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`JournalingSuggestionAsset`](/documentation/JournalingSuggestions/JournalingSuggestionAsset)

[`UIAccessibilityIdentification`](/documentation/UIKit/UIAccessibilityIdentification)

[`Copyable`](/documentation/Swift/Copyable)

[`NSItemProviderReading`](/documentation/Foundation/NSItemProviderReading)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSItemProviderWriting`](/documentation/Foundation/NSItemProviderWriting)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`UIItemProviderPresentationSizeProviding`](/documentation/UIKit/UIItemProviderPresentationSizeProviding)

[`Escapable`](/documentation/Swift/Escapable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`AttachableAsImage`](/documentation/Testing/AttachableAsImage)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)