Is XMP metadata supported in PNG images? - metadata

I've been trying to understand how XMP metadata worked on PNG files for the last few hours but couldn't quite wrap my head around it.
If I create a PNG image with Photoshop, save it and open the File Info dialog (File > File Info or Ctrl+Alt+Shift+I), I can see some XMP properties like CreateDate, CreatorTool or ModifyDate.
Now if I try to open the file with exiv2 and read the metadata it seems to not find anything:
auto image = Exiv2::ImageFactory::open(imagePath);
image->readMetadata();
Exiv2::XmpData &xmpData = image->xmpData();
The same goes with the exiftool -xmp:all myImage.png, exiv2 -P X myImage.png, or even GIMP (but I think it is using exiv2 internally).
This wouldn't be such an issue if any added metadata were not removed when saving again with Photoshop. In case this wasn't clear, opening the image and adding XMP metadata with exiv2, saving it, opening the image back in Photoshop and in the file info dialog, the properties added previously are not there any more.
The weird thing is that if you do this entire process with a JPEG image, everything works as expected: all the properties are visible from both Photoshop and exiv2 and if I try to add metadata with exiv2 (using the same code), it appears in Photoshop as well.
Am I missing something obvious? Is there anything special about PNGs that is not true for JPEGs? I haven't tried to use Adobe's SDK to edit the XMP data, is it any better?
Any help would be much appreciated as this is starting to drive me crazy :/
Edit: After reading this post I tried with Adobe Bridge and it doesn't seem to display the same properties as Photoshop. If I add XMP metadata with Exiv2 they are displayed in Bridge but if I modify the image in Photoshop, the metadata is gone from Bridge again.

Right, I finally got my hands on a copy of Photoshop CC and everything works fine. It must have been a bug in CS5 and CS6 that has been corrected in CC.
I think a recent update of Photoshop CS6 (13.1?) fixed this issue. It seems to have fixed problems with ICC color profiles in PNG images as well: http://forums.adobe.com/thread/1183489

Related

How can I reverse an accidental Gzip compression?

I am using Raspbian and had a folder full of images. I selected all of the images, right clicked them, and selected "Compress" so that I could put them in an archive to move to another computer. I selected archive type as "gz" and left "add archive extension to filename" checked. What was produced was a "[oneofthepicturefilenames].png.gz" which I moved to the other computer.
The problem is, when I open this .gz, I only see one png that is the size of the entire directory I compressed (1.4Gb). unfortunately, the source images were deleted, and I'm trying to figure out how to recover my images from this file as I assume their data is still there in some strange format. Any ideas?
The images aren't sensitive, so if anyone wants to take a look at what I've done, you can see the file here.

Creating activitybar Icons for VS Code

I have been trying numerous editors, from Inkscape, to online converters, to MS store apps, etc.
All I'm trying to do is find an easy way to create either transparent PNG files or SVG files for the activitybar icon inside of VS Code for an extension I'm working on.
Everything I've tried either totally warps the dimensions of what I create and seems to blow the image way up inside the activity bar, even though the files I'm saving as PNG are all 128px x 128px with 32 bit depth, same as another that ships with examples from https://github.com/Microsoft/vscode-extension-samples/tree/master/tree-view-sample
What I see in VS Code after specifying the path in the extension package.json:
What I am trying to get it to look like:
I've tried using SVG viewer plugins for VS Code as well, and sometimes the SVG's I've used don't even show up, even though an item does exist in the activity bar when I hover over the position it should be in.
Any modicum of help would be appreciated.

Eclipse plug-in: ObjectAid UML Explorer Class Diagram: export in higher resolution

I am using ObjectAid UML Explorer to generate a UML Class Diagram from my code.
I need to include the output PNG in a LaTeX document and what I get is way too low resolution for inclusion.
How can I get higher resolution output from the Eclipse plug-in?
I can see the internal format of a .ucls file is just XML:
<class-diagram version="1.0.10"...
Is there a way to get something more dense than 72dpi or something in a scalable format, say EPS or similar? The target document is > 300dpi so 72dpi does not even come close, unfortunately. Whatever rasterises the XML definition has to accept a trap and a pluggable module?
I need something that plugs into the auto-save mechanism of ObjectAid...
I've found a dirty but easy solution to the problem.
By printing the diagram to a PDF, e.g. with programs like PDFCreator, you gain a vector graphic in the PDF. With a graphics editing program like Adobe Photoshop or Gimp you can raster the PDF to a high quality PNG.
It worked fine for me.
With ObjectAid's Diagram Add-On you can make some customizations regarding the printing scale. There's also the possibility to save the diagrams as SVG image, which you can convert to a high quality pixel image, too.
Did you try to use a cropping/design tool such as snagit which would crop a copy of your computer screen and export it in high definition such as an image or directly paste and copy inside a word document ?
I have the same problem than you for providing documentation of my java code. I use EclipseUML Omondo but the image export is pretty poor too. I now prefer to use specific cropping tool for my image export which is a lot better.
I mean that you create the view you need on your computer screen then crop it and paste it in your documentation. I like to use the snagit's paste and copy feature with Microsoft word.
My favorite tool for cropping my UML diagrams is snagit.
Not possible until ObjectAid implements the feature...
Although it's not glamorous, what I did was go into Window | Preferences | General | Appearance | Colors and Fonts inside Eclipse and set all the text fields to double their size.
This created a larger diagram and the export was therefore in a higher res.

PhotoShop exports layers to files with bad filenames

I use Photoshop script,that export all layers into png files.
After script successfuly done, in saved folder files have strange filenames, like:
UI-_0000_Background.png
UI-_0001s_0001_Input-Background.png
This is my Layers:
Do you know how to save files with what format:
%(Prefix)%(LayerName)%(Additions).png
Like UI-Background#2x.png?
Or if you know another way how to save pngs from photoshop for Retina and non-Retina iPhone displayes, can you describe it, please?
Thx!)
I'm sure this is how the plugin supose to work. you should check in the Photoshop menu if there are any other options for this plugin to remove the 0000 and underscore. As sollution you can use IrfanView or similar software to rename your files using regex or special commands so you can remove the underscore and 0000 easely.

Could not load "my-icon.png" image referenced from a nib (iPhone)

I am receiving the following error message:
2011-02-11 14:47:13.815 myProject[13177:207] Could not load the "icon-troubleshoot.png" image referenced from a nib in the bundle with identifier "com.myCompany.myProject"
This file is an old file that was being used before, but has now been deleted. As far as I know icon-troubleshoot.png is not used anywhere in my project. I tried cleaning and rebuilding, emptying caches but it didn't work. Searching for the string troubleshoot as a textual reference and "contains" selected returned nothing. Does anyone know how I can find what is causing this error?
The warning message suggests there is a reference to this png file in your .xib or .nib file(s).
Now the question is how to find it. Xcode is poor at doing this. Opening every nib file in a text editor like textedit and manual searching is time consuming.
The best solution I have for such searching tasks is to fire up terminal and use grep command. Go to source folder of your project in terminal then you can run the following in your case:
grep -i -r --include=*.xib "my-icon.png" ./
This will return all *.xib files where my-icon.png is referenced.
Later when you will see those *.xib files in xcode you'll find a '?' sign in place of my-icon.png showing that image is indeed missing as you deleted it. Now you deleted it to replace it with another image. So select '?' mark symbol, open Utilities area (to the right) and choose the correct file name. That is all.
as far as I know the search tool of x-code do not search inside the xib files that's why your search returns nothing. Anyway It's really probable there's still a reference in a xib file somewhere. Because xib files are just xml, if you don't want to check all them manually, try to open all your xib with a text editor like TextMate and perform a global text search over the content for the .png filename.
Hope this helps.
Ciao!
Clean the whole project and recompile.
There must be a reference to this file in one of the nibs. If you can't find it, try deleting the nib file where the image was used, and create a new one.
Also, check your bundle for a reference to the image file.
I had this exact same issue and I found that when I included this file in the project I didn't specify both my Development and Distribution targets, only Development, so as soon as I tried building Distribution target, it wasn't found. You have to delete reference to this image, then re-add it and make sure you checkmark all of the targets that it should be found in.
This could happen if you only have an imageName#2x.png image and have run a low resolution non-retina display build.
Cut the height and width in half in your favorite image editor and then save it in the same folder as the #2x as imageName.png
Select your storyboard object in solution explorer, right click on storyboard->"Open As"->"Source Code", now you will see xml code from storyboard. Search your image name with Cmd+F and replace or remove it.