Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageIO: CreateMetadataFromXMPBufferInternal Threw error

Tags:

ios

image

My iPad app keeps displaying this message in the log.......

<Error>: ImageIO: CreateMetadataFromXMPBufferInternal  Threw error #203 (Duplicate property or field node)

It doesn't seem to have any functional effect on the application. I've Googled the error, only returns about 5 hits and none of them apply to iOS.

Any idea what is causing it and how to handle it / stop it logging?

like image 406
Ian Ellis Avatar asked Feb 21 '14 11:02

Ian Ellis


4 Answers

I just struggled with the same issue. It seems to happen in iOS7 when you attempt to read JPEG files using imageWithContentsOfFile.

As a workaround i switched to using imageWithData:

NSData * data = [NSData dataWithContentsOfFile:path]; 
if(data)   
  return [UIImage imageWithData:data];
like image 60
EsbenB Avatar answered Nov 02 '22 14:11

EsbenB


We had this problem because we had a .jpg file which was really a .png file saved with the wrong extension. Does it open properly with an image editing tool such as Photoshop? That was the key clue for us, is that it gave a parsing error reading opening in Photoshop.

like image 30
Marchy Avatar answered Nov 02 '22 15:11

Marchy


I just had the same error, but I'm using Corona SDK, so I cannot use the suggested solution because I'm not programing with Objective-C

ElTomato suggested in previous comments that the problem is with exif info, so I used an optimizer tool (Imageoptim.com) to remove exif info on jpg images. Imageoptim is a free program that removes exif info and comments, also it tries to find the best compression parameters.

I had the problem with my background images, in fact the problem was when I tried to setup a new background for the application. The application was working but the error was there. When I used the ImageOptim tool to remove exif info on my background images the app worked without error message.

like image 1
Koormo Avatar answered Nov 02 '22 16:11

Koormo


I just ran across this problem.

The original image was from an iPhone 5s. The image was created in my program without the warning mentioned above.

I loaded the image into gimp 2.8 (Mac) and immediately exported it. The image threw this warning when loaded it into my program.

Then I reloaded the original into gimp and exported it with a new name and under Advance Options I unchecked Save XMP Data. The exported image loaded into my program without the warning.

These images all had exifs and my program had no problems reading them. Don't know if they were using XMP (Extensible Metadata Platform) but I can live without it.

like image 1
JimH Avatar answered Nov 02 '22 15:11

JimH