Dev:UIImage

UIImage is an Objective-C class that represents a bitmap image.

Precomposed icon


These methods resize an image to icon size, clip out a rounded rectangle, draw shadows and apply a glossy overlay if required (when precomposed == NO), so that it resembles an icon.

The rendering of icon is actually done by.

If the input image is rectangular, the largest square portion in the top-left corner will be used.

Example:

_flatImageWithWhite:alpha:
Create an image having the same size as the original image, but filled with the solid color as the parameters.

_bezeledImageWithRed:green:blue:alpha:
Create a solid white image having the same size as the original image, and then stroke the top 1px edge by the specified color.

_imageScaledToSize:interpolationQuality: & _imageScaledToProportion:interpolationQuality:
Rescale the image to the new size.

+kitImageNamed:
Equivalent to _UIImageWithName(name).

+defaultDesktopImage
Return the user's lock screen image.

+setDesktopImageData:
Replace the user's lock screen image by the given JPEG data.

+ _deviceSpecificImageNamed: (inBundle:)
Like +imageNamed:(inBundle:) but with support for special longphone images (-568h)

_UIImageWithName
Obtain a built-in image. The name are stored in UIKit.framework/*.artwork. There are various ways to extract this information. A list of image names may also be helpful: 6.0, 2.0.

UIImageDataWriteToSavedPhotosAlbum
Write the image data to photos album. This is similar to UIImageWriteToSavedPhotosAlbum function in the SDK, except that you can choose the image format (the extension will always be *.jpg, however).

UIGetScreenImage
"Print screen" and returns the image. Note that this is a CGImage, so you need to convert it to a UIImage with.

Note that, although being a "Get" function, the returned image actually has retain count of +1, and the caller (you) are responsible to CGImageRelease it.

This function can be used for SDK apps between 2009 December and 2010 July

In firmware 3.2, UIGetScreenImage becomes an alias of the more appropriately-named UICreateScreenImage.

In arm64 version of iOS 7, the UIGetScreenImage was removed.

_UICreateScreenUIImage
Returns an image containing the contents of the screen. While similar in function to UIGetScreenImage, it uses the much faster CARenderServerRenderDisplay to perform the capture.