If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Does the .png image format have a text metadata field?
For .jpg image files, I can add text notes to them very easily: in
IrfanView, I just (open the image and then) type I (info) then C (comment). This doesn't work for the .png file format. _Does_ the .png format _have_ a metadata text field? If so, what utility lets you see it, and ideally edit it? (I'm talking about text that _becomes part of the file_, not that is attached to it in some "album" type management system: such that it remains part of the file even if the file is renamed, moved, or even emailed.) -- J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf Science isn't about being right every time, or even most of the time. It is about being more right over time and fixing what it got wrong. - Scott Adams, 2015-2-2 |
Ads |
#2
|
|||
|
|||
Does the .png image format have a text metadata field?
On 13/02/2020 10:59, J. P. Gilliver (John) wrote:
For .jpg image files, I can add text notes to them very easily: in IrfanView, I just (open the image and then) type I (info) then C (comment). This doesn't work for the .png file format. _Does_ the .png format _have_ a metadata text field? If so, what utility lets you see it, and ideally edit it? (I'm talking about text that _becomes part of the file_, not that is attached to it in some "album" type management system: such that it remains part of the file even if the file is renamed, moved, or even emailed.) I think it depends not just on whether the Portable Network Graphics format can contain metadata, but also whether you want the metadata to be available under, say, File or rt-click, Properties, Details in Explorer. The answer to the first seems to be yes, the second seems to be no. As a test I have just added some information to a *.png file using Paint Shop Pro, and it is remembered if the program is closed and then reopened and the same file loaded, and examination of the binary contents of the file shows the strings added to be there. However, they are not shown by the default Windows Image Viewer program, nor under the File, Properties in Explorer. |
#3
|
|||
|
|||
Does the .png image format have a text metadata field?
John,
_Does_ the .png format _have_ a metadata text field? Yes. The below document describes the iTXt, tEXt, and zTXt "chukns", which can be used to store such data. https://dev.exiv2.org/projects/exiv2...a_in_PNG_files If so, what utility lets you see it, and ideally edit it? I'm sorry, but I have absolutily no idea. Depending on your version of Windows you might be able to add/edit them using : rightclick on the image - properties - summary (Doesn't work under XP) If not, try a google for "png edit exif" (EXIF is a kinda metadata standard). Regards, Rudy Wieser |
#4
|
|||
|
|||
Does the .png image format have a text metadata field?
J. P. Gilliver (John) wrote:
For .jpg image files, I can add text notes to them very easily: in IrfanView, I just (open the image and then) type I (info) then C (comment). This doesn't work for the .png file format. _Does_ the .png format _have_ a metadata text field? If so, what utility lets you see it, and ideally edit it? (I'm talking about text that _becomes part of the file_, not that is attached to it in some "album" type management system: such that it remains part of the file even if the file is renamed, moved, or even emailed.) It has multiple flavors of metadata, according to this. https://stackoverflow.com/questions/...-data-like-jpg The original specification has two kinds of text chunks, a plaintext and a compressed text thing. And also has some other things which contain specific kinds of information. https://en.wikipedia.org/wiki/Portable_Network_Graphics "ancillary chunks" The above (temporally long) StackOverflow claims in 2017, an actual EXIF chunk was added. The benefit of this, is no "custom" handler would be needed to attempt to parse key-value pairs from one of the older chunk types. Since this is optional, no program absolutely has to add it, and the usual 4CC parse logic applies (a field you don't understand, ignore it). http://ftp-osl.osuosl.org/pub/libpng....0.html#C.eXIf [4CC code of "eXIf" case sensitive] As of today then, you can add it. It's just a matter of "tools" to do it. Note that the idea of compressing text means that you can't just necessarily dump the old chunk style into a hex editor and "recognize" the text by eye. Only the weakest kinds of compression (like LZ4) allow doing that. Whereas, at a guess, if an EXIF chunk was added, I would expect the EXIF chunk to be similar to other image formats, and concentrate more on usability than efficiency. If we could find an example of a 2017+ PNG with added EXIF, then we could check for that. But otherwise, PNG has a lot of emphasis on efficiency. That's why one PNG program, it attempts to compress a PNG like 20 times (with different settings), it compares all the compressed sizes, then "picks" the smallest file out of the lot. PNG has multiple bit-depth settings, which allow cartoon-like materials to be heavily compressed. For some reason, the program for doing that can't seem to just pick the best options from an analysis of the format, and relies on brute force compression followed by selection, to pick the format. People use such programs for web site preparation and crushing the byte count for best efficiency. Like it matters when the .js fleet is 5MB :-( "The part that pays the bills", they don't care how big that part gets. Whereas the PNG file must be crushed flat. So if you were expecting to see a lot of metadata in web page PNGs, I would guess it wouldn't be that common. It would take a JPG camera picture, a workflow with 2017 extension support, followed by presentation of the item by an amateur somewhere. In a quick search, the PNGs in my current download folder, none of those seemed to have anything resembling an EXIF. But that doesn't mean anything. Whereas if I were to start throwing downloaded JPG images into HxD, I would likely be seeing some text up near the front (an occasional JPG would still have the camera data). Summary: Yes, you can add metadata. Problem one, is adding the new chunk type. Problem two, is a recipient being able to view the new added chunk. Problem three, is downloading a recent enough tool, so that JPG to PNG conversion, conserves the EXIF part, so you won't be doing this by hand. I doubt I have anything like that here, since I would never have expected an image format to evolve, and then me needing to upgrade tools for that specific purpose. Imagemagick is probably the tool I would be most likely to sample a new version. GIMP, the "playing with the interface crap", has driven me away from trying new versions. While I have Irfanview on a number of OS installs here, I don't spend a lot of time in that program to know when support for that would be added. For these newsgroups then, the question would be whether the federated search has a handler for EXIF in PNG and indexes it, or has an option to display an EXIF chunk if you manage to add one. I presume you want integration so the OS does something useful too. If the 2017 date is correct, I wouldn't expect miracles. Even Windows 10 might be missing support. Paul |
#5
|
|||
|
|||
Does the .png image format have a text metadata field?
In message , R.Wieser
writes: John, _Does_ the .png format _have_ a metadata text field? Yes. The below document describes the iTXt, tEXt, and zTXt "chukns", which can be used to store such data. https://dev.exiv2.org/projects/exiv2...a_in_PNG_files Thanks. You, Java Jive, and Paul have confirmed that. If so, what utility lets you see it, and ideally edit it? I'm sorry, but I have absolutily no idea. Depending on your version of Windows you might be able to add/edit them using : rightclick on the image - properties - summary (Doesn't work under XP) Nor 7 (there is no "summary" tab [or even a "Summary" one]). Java Jive said he used Paint Shop Pro to add some "information" to a ..png, and since he said he found the "strings" in the file afterwards, I presume he meant text. I think I have PSP somewhere (IIRR even a Big Version they made available when they wanted to close down servers or something, though that may be something else), but it seems a bit of a sledgehammer to load it just for this. If not, try a google for "png edit exif" (EXIF is a kinda metadata standard). Regards, Rudy Wieser I'm just doing that. www.thexifer.net seems to be a web-based one. ExifTool is a command line one, though there are GUI ones that use it. Exif Pilot (https://www.colorpilot.com/exif.html) looks promising and small (and free), and claims to do .png ... Trying: yes, seems to work. (There's a "Comment" field. From the layout - it's a single line - there might well be a size limit, and I suspect it won't allow line feeds.) Had a term in the licence I haven't seen befo something like "you may not use previous versions". I poked around in it and couldn't see any mention of updates, but that doesn't mean it doesn't automatically get them. (For the rare times I'm likely to use it, I CBA to be bothered.) -- J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf "Gentlemen, you can't fight in he this is the war room!" (Dr. Strangelove) |
#6
|
|||
|
|||
Does the .png image format have a text metadata field?
John,
Java Jive said he used Paint Shop Pro to add some "information" to a .png, /Any/ program can use those those "chunks" (and not"chukns" :-) ) to store (textual, meta) data into. And thats the whole problem. You can put a bit of text in there, but the moment you want to store multiple pieces of information (name and date to name two) the way to identify and seperate those pieces is fully upto the person who (or program which) adds the metatdata, as there is no specification for it. You can ofcourse decide use a program that puts an EXIF formatted metadata block into them, but that needs its own not-as-simple parsing and doesn't offer fields you can name yourself. Yep, you're stuck between a rock and a hard place. :-) Regards, Rudy Wieser |
#7
|
|||
|
|||
Does the .png image format have a text metadata field?
J. P. Gilliver (John) wrote:
In message , R.Wieser writes: John, _Does_ the .png format _have_ a metadata text field? Yes. The below document describes the iTXt, tEXt, and zTXt "chukns", which can be used to store such data. https://dev.exiv2.org/projects/exiv2...a_in_PNG_files Thanks. You, Java Jive, and Paul have confirmed that. If so, what utility lets you see it, and ideally edit it? I'm sorry, but I have absolutily no idea. Depending on your version of Windows you might be able to add/edit them using : rightclick on the image - properties - summary (Doesn't work under XP) Nor 7 (there is no "summary" tab [or even a "Summary" one]). Java Jive said he used Paint Shop Pro to add some "information" to a .png, and since he said he found the "strings" in the file afterwards, I presume he meant text. I think I have PSP somewhere (IIRR even a Big Version they made available when they wanted to close down servers or something, though that may be something else), but it seems a bit of a sledgehammer to load it just for this. If not, try a google for "png edit exif" (EXIF is a kinda metadata standard). Regards, Rudy Wieser I'm just doing that. www.thexifer.net seems to be a web-based one. ExifTool is a command line one, though there are GUI ones that use it. Exif Pilot (https://www.colorpilot.com/exif.html) looks promising and small (and free), and claims to do .png ... Trying: yes, seems to work. (There's a "Comment" field. From the layout - it's a single line - there might well be a size limit, and I suspect it won't allow line feeds.) Had a term in the licence I haven't seen befo something like "you may not use previous versions". I poked around in it and couldn't see any mention of updates, but that doesn't mean it doesn't automatically get them. (For the rare times I'm likely to use it, I CBA to be bothered.) This is a sample image with old-style metadata in a PNG. https://i.stack.imgur.com/UiagX.png identify -verbose UiagX.png Properties: Author: Hans Müller Date: 2010-12-08 09:45 date:create: 2010-12-08T13:15:43+01:00 date:modify: 2010-12-08T13:15:43+01:00 Desc: A long time ago in a galaxy far far away.... signatu 3b4a54202316a7ae4b4fe0e431d47958181f4bb89349335582 0d4ba74f9f5ee3 It's possible the Desc is the "Comment" capability. I could also find a reference to "tools doing naughty things", such as taking EXIF data and stuffing it into old-style metadata carriage. This just makes it harder for other tools to do a good job on incoming files. There are supposed to be sample files with the EXIF proposal for PNG, but I couldn't find them. Adding a comment to the file might be easier than adding a clutch of standard EXIF values. In theory, adding EXIF values would be better for federated search indexing, but you know how sketchy Windows support is for that stuff anyway (only "standard" EXIF fields are indexed). ******* https://en.wikipedia.org/wiki/ExifTool https://exiftool.org/ ExifTool is also available as a stand-alone Windows executable: (Note that these versions contain the executable only, and do not include the HTML documentation or other files of the full distribution above.) Windows Executable: exiftool-11.86.zip (6.2 MB) The stand-alone Windows executable does not require Perl. Just download and un-zip the archive then double-click on "exiftool(-k).exe" to read the application documentation, drag-and-drop files and folders to view meta information, or rename to "exiftool.exe" for command-line use. Runs on all versions of Windows. (Note: Oliver Betz provides an alternate ExifTool Windows installer that avoids some problems of the self-extracting archive version above) That sounds like fun :-/ Paul |
#8
|
|||
|
|||
Does the .png image format have a text metadata field?
In message , R.Wieser
writes: John, Java Jive said he used Paint Shop Pro to add some "information" to a .png, /Any/ program can use those those "chunks" (and not"chukns" :-) ) to store (textual, meta) data into. And thats the whole problem. You can put a bit of text in there, but the moment you want to store multiple pieces of information (name and date to name two) the way to identify and seperate those pieces is fully upto the person who (or program which) adds the metatdata, as there is no specification for it. You can ofcourse decide use a program that puts an EXIF formatted metadata block into them, but that needs its own not-as-simple parsing and doesn't offer fields you can name yourself. Yep, you're stuck between a rock and a hard place. :-) Regards, Rudy Wieser Not really; I only wanted a free-form text area (a "Comment" field if you like). Exif Pilot does seem to give me that - _and_ fixed fields for assorted dates, and other things, which _implies_ that those are in fact set down in the format. Are you saying they're not? Is there a general format for an EXIF "block", which the various image file formats - .jpg, .png, etc.- just form a "wrapper" for? I had assumed not, i. e. that each image file format had its own (some optional) blocks, at least for things like photograph details (camera model, date taken, lens and "film" settings, shutter speed, and so on). 2 -- J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf Hadrian's Wall has never been a border between Scotland and England. It lies entirely within England but, when it was built in AD 122 by the Romans as a defence against the raiding Picts, the future English were still in Germany and the Scottish were still in Ireland. - Michael Cullen, Skye, in RT 2014/12/6-12 |
#9
|
|||
|
|||
Does the .png image format have a text metadata field?
"J. P. Gilliver (John)" wrote
| Java Jive said he used Paint Shop Pro to add some "information" to a | .png, and since he said he found the "strings" in the file afterwards, I | presume he meant text. I think I have PSP somewhere (IIRR even a Big | Version they made available when they wanted to close down servers or | something, though that may be something else), but it seems a bit of a | sledgehammer to load it just for this. It seems to be like JPG of 20 years ago. As others have said, there are accommodations for metadata strings in the file format, but that doesn't make it standard. I just tried a PNG with metadata in IrfanView. It didn't see the data. But actually, this PNG doesn't have data as such. It only has the labels, like Author, Description, etc. A second file has no labels. I'm surprised you care about this. I have a hard time even finding a PNG on my drives. The only ones I have are charts that I downloaded from webpages. Few suites use them because they're big. A JPG can show a photo image much smaller. A GIF can show a chart much smaller. I really don't understand why anyone uses PNG online. One could use PNG for compressed images on disk, but for that there's TIF. I have PSP 5 and 16. The former doesn't recognize JPG EXIF data. The latter saves it. I prefer the former. But ever since people started taking photos of everything with their phones, there's a big call for JPG metadata standardization. That won't happen with PNG unless there's a call for that. Which would probably require that PNG become the standard for low quality cellphone/camera photos. PNG is better in being lossless. But PNG also takes up more space, so that might not happen. When photos are just for sending between phones, quality doesn't matter much. |
#10
|
|||
|
|||
Does the .png image format have a text metadata field?
"J. P. Gilliver (John)" wrote
| Not really; I only wanted a free-form text area (a "Comment" field if | you like). Exif Pilot does seem to give me that - _and_ fixed fields for | assorted dates, and other things, which _implies_ that those are in fact | set down in the format. Are you saying they're not? | | Is there a general format for an EXIF "block", which the various image | file formats - .jpg, .png, etc.- just form a "wrapper" for? I had | assumed not, i. e. that each image file format had its own (some | optional) blocks, at least for things like photograph details (camera | model, date taken, lens and "film" settings, shutter speed, and so on). Each format is entirely different. Embedded metadata is mainly the invention of Adobe. Then it was useful and became standardized through use. But it's still not entirely standard. And EXIF data is not required for the format. Meanwhile, everyone and his brother have made up their own tags. Microsoft even created tags with unicode strings, breaking the rule everyone else follows. But it's their tag and it's an open standard. So whether this stuff is official depends mostly on how many people use it. JPG metadata is popular mainly because people want to tag their photos from Sally's wedding, and because journalists want to infest their photos with official copyright data, not realizing that data is not actually part of the image data but only an optional addition to the file header that can be easily removed. In general, file formats include a header and data. The header IDs the file type and can include a lot more info in some cases. But the only required parts are the parts that allow the file data to be interpreted as intended. These image files are raster images, which means they're all bitmaps. All of them store data that can be unpacked to provide a gridwork of pixel values in order to render the image. A BMP is little more that that data in a long string. You could actually count down into the file, if you wanted to, to find the RGB pixel values of the pixel at 300,400 offset from the top right corner. A TIF is usually just a BMP that's been zipped. GIF, JPG, PNG all use different methods to compress the data and all have unique pros and cons. But they're all ways to package a bitmap. If you look at the link you'll see a PNG is somewhat unusual. The header, such as it is, is only a few bytes IDing the file type. What's usually called the "file magic". The rest is blocks of data with identifying bytes. PNGs also come in a large number of types. It's a very complex format. And since there's no simple rule for putting metadata in a header, as there is for JPG, it's a more difficult task. |
#11
|
|||
|
|||
Does the .png image format have a text metadata field?
John,
Not really; I only wanted a free-form text area (a "Comment" field if you like). Than you are home-free as they say. :-) Exif Pilot does seem to give me that - _and_ fixed fields for assorted dates, and other things, which _implies_ that those are in fact set down in the format. Are you saying they're not? No, I tried to say that you can use every field EXIF offers, but if you would want to add a, for example, "Comments_two" field you would be out-of-luck. The "character size" of an EXIF field is bound to its (numeric) type. You could introduce a new type, but if some other program isn't aware of that new type (and thus can't look-up the "character size") it will break its parsing of the EXEF datablob (as you do not know where the next field starts). Is there a general format for an EXIF "block", Yes. which the various image file formats - .jpg, .png, etc.- just form a "wrapper" for? No. Though, as mentioned, you can put an EXIF blob into an "put anything you wish here" free-form field - /if/ the image format offers it. Don't expect, for example, the venarable BMP format to have it. I had assumed not, i. e. that each image file format had its own (some optional) blocks, The newer image formats often have such an optional free-to-use block, the older ones not. Though IIRC the "newer" DDS image format doesn't have one either. at least for things like photograph details (camera model, date taken, lens and "film" settings, shutter speed, and so on). Definitily not that, as quite a number of image formats had/have no connection whatsoever with a camera. PNG is one of those. Regards, Rudy Wieser |
#12
|
|||
|
|||
Does the .png image format have a text metadata field?
In article , Mayayana
wrote: Each format is entirely different. Embedded metadata is mainly the invention of Adobe. no. https://en.wikipedia.org/wiki/Exif The Japan Electronic Industries Development Association (JEIDA) produced the initial definition of Exif. Version 2.1 of the specification is dated 12 June 1998. JEITA established Exif version 2.2 (a.k.a. "Exif Print"), dated 20 February 2002 and released in April 2002. Then it was useful and became standardized through use. But it's still not entirely standard. exif is very much a standard, although some tags can contain device specific data. A TIF is usually just a BMP that's been zipped. no. tiff is *not* a zipped bmp. it's an entirely different format. GIF, JPG, PNG all use different methods to compress the data only jpg and png compress image data. and all have unique pros and cons. everything has pros and cons. But they're all ways to package a bitmap. all very good ways. |
#13
|
|||
|
|||
Does the .png image format have a text metadata field?
On 13/02/2020 13:54, Mayayana wrote:
"J. P. Gilliver (John)" wrote | Java Jive said he used Paint Shop Pro to add some "information" to a | .png, and since he said he found the "strings" in the file afterwards, I | presume he meant text. I think I have PSP somewhere (IIRR even a Big | Version they made available when they wanted to close down servers or | something, though that may be something else), but it seems a bit of a | sledgehammer to load it just for this. Yes, I added two strings into two of the four fields offered under View, Image Information, Creator Information, (but the menu path is probably different in different versions of PSP) which are ... Image Title I put something here Artist Name Copyright Description I put something else here .... and I could see the results in a hexadecimal disply of the image file, but, as already indicated, not in Windows File Explorer or Windows Image Viewer (W7 HP versions). I'm surprised you care about this. I have a hard time even finding a PNG on my drives. The only ones I have are charts that I downloaded from webpages. Few suites use them because they're big. A JPG can show a photo image much smaller. A GIF can show a chart much smaller. As you indicated further on in a part I snipped because I've nothing further to add to it, the difference is in the compression: PNG is a lossless format, others such a JPEG are lossy, and the difference can be important. So, for example, it used to be that BBC used JPEGs for their images in their news pages, but they were so compressed to hell that you couldn't actually see much in them, and if they were graphs, forget trying to read the legend or the scales! Haven't had cause to examine one closely recently, so don't know what their current standards are. For this reason, when I put something up on my site where detail is important, invariably I use PNG. As some here, and in some other ngs, may know and recall, over the last year or so I have scanned my way through a trunk full of ancient Macfarlane documents that have come down through my family over many generations, some of them so old as even to be parchments on animal skin. I have use PNGs exclusively for this work, and in fact use them almost universally for anything that I produce. I really don't understand why anyone uses PNG online. One could use PNG for compressed images on disk, but for that there's TIF. TIFF files are *MUCH* bigger than PNG, for example 22.1Mb as opposed to 8.24MB for the same picture. |
#14
|
|||
|
|||
Does the .png image format have a text metadata field?
Nospam,
GIF, JPG, PNG all use different methods to compress the data only jpg and png compress image data. No, Mayayana is right. GIF compresses the image using LZW. https://en.wikipedia.org/wiki/GIF Regards, Rudy Wieser |
#15
|
|||
|
|||
Does the .png image format have a text metadata field?
In article , R.Wieser
wrote: GIF, JPG, PNG all use different methods to compress the data only jpg and png compress image data. No, Mayayana is right. GIF compresses the image using LZW. https://en.wikipedia.org/wiki/GIF it's actually both, since uncompressed gif avoids patent issues, although the patents have expired. https://en.wikipedia.org/wiki/GIF#Uncompressed_GIF |
Thread Tools | |
Display Modes | |
|
|