Questions tagged [cgimagesource]
27 questions
1
vote
1 answer
CGImageDestination not taking properties
I am exporting an animated gif using swift targeting Mac OS, which works but the properties I've set aren't being applied.
I have set up my properties and when I log them they show up like so:
{
HasGlobalColorMap = 1;
LoopCount = 0;
}
In a loop I…

Jay
- 902
- 2
- 12
- 27
1
vote
1 answer
CGImageSourceRef imageSource = CGImageSourceCreateWithURL returns NULL
I want to get the Size of the image without loading it so i am using the below code
-(float)gettingimagedimensions:(NSString*)url{
NSURL *imageFileURL = [NSURL fileURLWithPath:url];
//CGImageSourceRef imageSource =…

TALAA
- 6,184
- 1
- 13
- 21
0
votes
1 answer
What is the purpose of `kCGImageSourceShouldAllowFloat` for Image I/O?
When you use Image I/O on macOS, there's an option kCGImageSourceShouldAllowFloat which is documented as follows:
Whether the image should be returned as a CGImage object that uses floating-point values, if supported by the file format. CGImage…

Sindre Sorhus
- 62,972
- 39
- 168
- 232
0
votes
1 answer
kCGImagePropertyGIFLoopCount returns wrong value
I have three GIF files which are loaded as NSData.
When I use the key kCGImagePropertyGIFLoopCount to retrieve the LoopCount, it returns a wrong value.
For the GIF which should loop infinitely, it returns 0 (correct).
For the GIF with Loop count 1,…

Raildex
- 3,406
- 1
- 18
- 42
0
votes
2 answers
Getting Depth Data from UIImagePickerController
I am trying to get the depth data associated with an image in the PhotoLibrary.
I can get the image, and the URL, but I can't seem to get the aux data associated with it. The call to CGImageSourceCreateWithURL returns a source, but the call to…

Millerw
- 1
- 1
0
votes
1 answer
CGImageSourceCreateWithURL return always nil
CGImageSourceCreateWithURL return always nil. I am passing [NSURL fileURLWithPath:getImagePath]. I have double check that image is there with url i am passing. Please find out the code below.
NSURL *imageURL = [self getImageAtTime:i…

Hit_Var
- 104
- 9
0
votes
3 answers
CFURLCreateDataAndPropertiesFromResource failed with error code -15
I'm trying to lead a TIFF image into a CGImageSource using CGImageSourceCreateWithURL. My URL is correct, is %20 encoded, is a path to an existing file, that file is a TIFF. However, the line:
NSString *fullPath = [[[fileNames objectAtIndex:pageNum…

Brian Postow
- 11,709
- 17
- 81
- 125
0
votes
0 answers
CGImageSource can't open RAW Canon image file (using Swift)
I have a little script written in Swift that I used to manipulate some RAW images, and it worked wonders until some previous version of Xcode (I don't remember exactly which was the last one, but I know it worked with version 7.0, because I…

felipou
- 654
- 6
- 16
0
votes
0 answers
get image metadata without decoding image data (iOS)
I have an image file in my app directory. This is not encoded with the iOS default encoder but our own encoders.
The format can be JPEG (EXIF) or TIFF. They have been checked for compliancy with standards so for this post, we can treat it as any…

Shravya Boggarapu
- 572
- 1
- 7
- 23
0
votes
1 answer
How to load a self-made TIFF image file from NSDocumentsDirectory
When trying to load files from the NSDocumentsDirectory of an iPhone, I cannot create the image source with the path string I have.
I get the error message ": ImageIO: CGImageSourceCreateWithURL CFURLCreateDataAndPropertiesFromResource failed…

AOphagen
- 308
- 2
- 18
0
votes
1 answer
kCGImageStatusUnknownType when calling CGImageSourceCreateWithDataProvider from UIGraphicsGetImageFromCurrentImageContext
I'm trying to create a CGImageSourceRef from a CGDataProviderRef. The CGDataProviderRef comes from a UIImage that was created with UIGraphicsGetImageFromCurrentImageContext. When I do this and check the status of my image source, it's returning…

taber
- 3,166
- 4
- 46
- 72
0
votes
1 answer
CFImageSource thinks my retina image is 2x as large as it actually is
When I do an NSLog on the size of the image after putting it into a UIImage, it comes out at the expected size. When I try this with CGImageSource however, I get an image twice the size as I was expecting. This is the code I'm using for…

Andrew
- 15,935
- 28
- 121
- 203