A Windows XP help forum. PCbanter

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.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Does the .png image format have a text metadata field?



 
 
Thread Tools Display Modes
  #16  
Old February 13th 20, 06:12 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
J. P. Gilliver (John)[_7_]
external usenet poster
 
Posts: 603
Default Image formats (was: Does the .png image format have a text metadata field?)

In message , R.Wieser
writes:
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


I think the confusion might be over what is meant by "compress[ion]" -
which may be lossy or not.

JPG uses lossy compression - the _degree_ of which is adjustable
(depending on what's being used to create it, either a crude "quality"
switch [many cameras just offer two or three], or a slider [sometimes
labelled "per cent"], or a desired file size). It's still by far the
most widely used format (probably because most cameras produce it, in
all but expensive ones not giving any other option). Though lossy, and
lots of people say you should _never_ re-save such an image, its
compression is surprisingly good in many situations - not just many
(arguably the majority of) photographs, but even scanned documents,
where you'd think the compression would have worse consequences than it
actually does.

GIF uses lossless compression - provided there were only 256 or fewer
colours in the original image. (It's thus great for many logos, and some
cartoons.) If there were more, the encoder selects the best 256 (i. e.
it's not the same 256 for all GIFs). For a surprising number of images,
this _doesn't_ matter much - especially ones with lots of fine detail;
it tends to show up worst in things with _gradual_ shading variation,
such as the skies in sunsets, or a billiard ball, apple, or cheek. On
the whole, though, I'd use .jpg (by default, at what IrfanView calls 80%
quality, I think) _for photos_, if choosing just between those two.

PNG was I thought invented because some of the patents on some of the
others were keeping some lawyers in business; those have expired now
though. It also, being a more-recently-devised format, has some
advantages. Whether it uses - or _can_ use - lossless compression, I
don't know; some in this thread have said it is lossless, but haven't
said whether that's optional. I don't originate it myself so don't know
much about it, but sometimes I download images that are in it, and I
don't like converting unnecessarily, so I have some PNGs.
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

" ... but ... on the sub-ether radio, [it said] you're dead!"
"Yeah, that's right, I just haven't stopped moving yet." (link episode)
Ads
  #17  
Old February 13th 20, 06:32 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
J. P. Gilliver (John)[_7_]
external usenet poster
 
Posts: 603
Default Does the .png image format have a text metadata field?

In message , R.Wieser
writes:
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.


No, I was just wondering if there was "Comments 1" - I thought maybe
there wasn't, since IrfanView didn't offer access to it. Seems it (PNG)
_does_ have such a field, just IV doesn't know about it. (I've emailed
Irfan asking if a future version might.)

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).


No, I didn't want to invent a new one (as you say, that'd be no good to
anything that knows about the standard ones) - just use the existing one
if there was one. Which it appears there is.
[]
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.


No, I didn't want a "spare" block, only one for text. (Though I suppose
in a format that didn't specifically have a text one, I could use that.
But not necessary in this case.)
[]
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

" ... but ... on the sub-ether radio, [it said] you're dead!"
"Yeah, that's right, I just haven't stopped moving yet." (link episode)
  #18  
Old February 13th 20, 07:03 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
J. P. Gilliver (John)[_7_]
external usenet poster
 
Posts: 603
Default Does the .png image format have a text metadata field?

In message , Mayayana
writes:
[]
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.


Seems the format _can_ have these fields; I don't know if that means
_every_ .png _does_ have them. (In the same way a JPG _can_ have both
EXIF and Comments, but doesn't _have_ to; in IrfanView, whether it does
is shown by the presence or absence of asterisks on the EXIF and comment
buttons.) It seems IrfanView doesn't yet know about the _possibility_ of
these fields in the .png format, though.

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 don't originate in it, but as you say, sometimes downloads come in it
- and I don't like to do needless format conversions.

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


I had 5 and 7 - I think way back on my '98SElite machine. I preferred 5
- the only reason I ever used 7 was the odd image that was too big for 5

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.


2
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

You can believe it if it helps you to sleep. - Quoted by Tom Lehrer (on
religion, in passing), April 2013.
  #19  
Old February 13th 20, 07:27 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Does the .png image format have a text metadata field?

nospam,

it's actually both, since uncompressed gif avoids patent issues,
although the patents have expired.

https://en.wikipedia.org/wiki/GIF#Uncompressed_GIF


I guess you got lucky googeling.

Next time do not try to assert stuff you do not know much, if anything,
about though. The above is the exception to the rule, but not even activily
used - users ignored the patent issues (duh), and businesses simply used
other image formats (to avoid to even be /accused/ of patent violations) and
ultimatily came up with the PNG format to replace it.

Regards,
Rudy Wieser


  #20  
Old February 13th 20, 07:32 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Image formats (was: Does the .png image format have a text metadata field?)

John,

I think the confusion might be over what is meant by "compress[ion]" -


I don't think so.

GIF uses lossless compression


So does PNG. But he named only GIF as /not/ using compression.

Regards,
Rudy Wieser


  #21  
Old February 13th 20, 07:38 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
nospam
external usenet poster
 
Posts: 4,718
Default Does the .png image format have a text metadata field?

In article , R.Wieser
wrote:


it's actually both, since uncompressed gif avoids patent issues,
although the patents have expired.

https://en.wikipedia.org/wiki/GIF#Uncompressed_GIF


I guess you got lucky googeling.


that's from *your* link.

Next time do not try to assert stuff you do not know much, if anything,
about though. The above is the exception to the rule, but not even activily
used -


it was used quite a bit.

users ignored the patent issues (duh), and businesses simply used
other image formats (to avoid to even be /accused/ of patent violations) and
ultimatily came up with the PNG format to replace it.


one of several reasons for png.
  #22  
Old February 13th 20, 07:39 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Does the .png image format have a text metadata field?

John

In the same way a JPG _can_ have both EXIF and Comments, but doesn't
_have_ to;


Are you sure about that ?

The last time I edited the EXIF information in a JPG image using the
"properties" dialog Windows has the "Comments" that I had also put in there
where hoovered into the EXIF block. Definitily not what I expected or
wanted.

Or, in other words: You can put them in there, but its easy to lose the
non-EXIF comment(s).

Regards,
Rudy Wieser


  #23  
Old February 13th 20, 08:27 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
J. P. Gilliver (John)[_7_]
external usenet poster
 
Posts: 603
Default Does the .png image format have a text metadata field?

In message , R.Wieser
writes:
John

In the same way a JPG _can_ have both EXIF and Comments, but doesn't
_have_ to;


Are you sure about that ?


If I open most .jpg files in IrfanView, and type i (for information), I
get a popup table of information - mostly what has to be there, like
filename, path, compression, size in pixels, and so on. At the bottom,
there are a couple of buttons "IPTC info" and "Comment", as well as "OK"
which closes it. (Some JPEGs also have an "EXIF info" button.)

If I have added a comment, the comment button becomes "Comment *" (note
the asterisk); similarly for the IPTC info one. I'm not sure how I can
get the EXIF one to appear if it doesn't; I hadn't until now noticed
that it is sometimes there and sometimes not for JPEGs (the Comment and
IPTC buttons are always there, just not always with their asterisk). [I
only ever use the Comment one; I don't usually touch EXIF or IPTC.]

The last time I edited the EXIF information in a JPG image using the
"properties" dialog Windows has the "Comments" that I had also put in there
where hoovered into the EXIF block. Definitily not what I expected or
wanted.


On here (W7HP32, Classic Shell if that's relevant), the Properties box
doesn't _have_ Comments tab.

If you wanted to add something to a file but not have it become part of
the file, where _did_ you want it to go - into the directory information
somewhere? Each to his own, but I'd be concerned that it might not
remain associated with the file if that was the case - if I moved, or
even renamed, the file.

Or, in other words: You can put them in there, but its easy to lose the
non-EXIF comment(s).


Whether EXIF or some other part of the format specification, there can
always be the danger of loss, if the file is adjusted by software that
either does not know about those fields, or which sets them to default
values.

Regards,
Rudy Wieser


2
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

resentment is like drinking poison and expecting the other person to die -
attributed to Carrie Fisher by Gareth McLean, in Radio Times 28 January-3
February 2012
  #24  
Old February 13th 20, 09:12 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Does the .png image format have a text metadata field?

John,

On here (W7HP32, Classic Shell if that's relevant), the Properties box
doesn't _have_ Comments tab.


I was not talking about a tab (in the properties dialog), but about a
freeform textfield thats part of (stored in) the image. You know, one of
those iTXt, tEXt, and zTXt "chunks" that are defined for a .PNG image.

Just to be /absolutily sure/ I just retried it with a .JPG image which had
textual data stored in a 0xFFFE ID'd blocks (date, origional name). But
after having entered some data in the image properties - summary dialog
(mind you, XP here) the 0xFFFE blocks where gone, hoovered up by EXIF, and
stored in it as 0x9286 (UserComment) records.

But feel free not to believe me. Try it for yourself.

Regards,
Rudy Wieser


  #25  
Old February 13th 20, 09:41 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
J. P. Gilliver (John)[_7_]
external usenet poster
 
Posts: 603
Default Does the .png image format have a text metadata field?

In message , R.Wieser
writes:
John,

On here (W7HP32, Classic Shell if that's relevant), the Properties box
doesn't _have_ Comments tab.


I was not talking about a tab (in the properties dialog), but about a
freeform textfield thats part of (stored in) the image. You know, one of
those iTXt, tEXt, and zTXt "chunks" that are defined for a .PNG image.

Just to be /absolutily sure/ I just retried it with a .JPG image which had
textual data stored in a 0xFFFE ID'd blocks (date, origional name). But
after having entered some data in the image properties - summary dialog


Can you explain in baby steps how you get to the "image properties -
summary dialog", so I can do exactly what you're doing? (Are you
starting from Windows Explorer, for example, or somewhere else?)

(mind you, XP here) the 0xFFFE blocks where gone, hoovered up by EXIF, and
stored in it as 0x9286 (UserComment) records.


7HP32 here.

But feel free not to believe me. Try it for yourself.


I'm not disbelieving you, just not sure where you're starting from.

Regards,
Rudy Wieser


2
--
J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

"If even one person" arguments allow the perfect to become the enemy of the
good, and thus they tend to cause more harm than good.
- Jimmy Akins quoted by Scott Adams, 2015-5-5
  #26  
Old February 13th 20, 11:30 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Shadow
external usenet poster
 
Posts: 1,638
Default [OT]Does the .png image format have a text metadata field?

On Thu, 13 Feb 2020 09:14:39 -0500, "Mayayana"
wrote:

"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.


Since almost all image formats are compressed, do you know a
tool that can un-compress the data to look for "hidden" text or files?
There's a lot of apps that do steganography, so there must be
something to identify the method used (a generic un-packer).
The NSA would be naked without one. LOL.

Examples of steganographic tools:

https://www.ostechnix.com/hide-files...-images-linux/

PS The "cat" method is too primitive. Or "copy /y /b
image_file to_hide_file outputfile". You can see the text (or the file
headers eg the PK of a zip) with a hexeditor.
The best ones are those that imbed the text in the unused part
of the image and then compress it. The file size doesn't change much,
if at all. And the image does not lose its properties.
I've strayed a bit from the topic. OT up...
[]'s
--
Don't be evil - Google 2004
We have a new policy - Google 2012
  #27  
Old February 14th 20, 01:02 AM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Image formats (was: Does the .png image format have a text metadata field?)

"J. P. Gilliver (John)" wrote

| PNG was I thought invented because some of the patents on some of the
| others were keeping some lawyers in business; those have expired now
| though. It also, being a more-recently-devised format, has some
| advantages. Whether it uses - or _can_ use - lossless compression, I
| don't know; some in this thread have said it is lossless, but haven't
| said whether that's optional. I don't originate it myself so don't know
| much about it, but sometimes I download images that are in it, and I
| don't like converting unnecessarily, so I have some PNGs.

As Rudy said, PNG is lossless, but it also has an alpha channel
for transparency. So it doesn't dump data the way JPG does,
and it also uses 4 bytes per pixel instead of the 3 that JPG
does. That makes it bigger. Each pixel can have a percentage
transparency, recorded in the 4th byte.

I don't know of anything to recommend PNG, but it could
make sense online where high image quality in 24-bit is needed.
There's no other widely supported formate for that. The
transparency feature is also nice, but I'm not aware of any
program for creating finely detailed transparency. For instance,
if you want a logo for "John's English Diner" and you want
a knife and fork semi-transparent, how do you do that in one
image? I don't know.


  #28  
Old February 14th 20, 01:05 AM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Mayayana
external usenet poster
 
Posts: 6,438
Default [OT]Does the .png image format have a text metadata field?

"Shadow" wrote

| Since almost all image formats are compressed, do you know a
| tool that can un-compress the data to look for "hidden" text or files?
| There's a lot of apps that do steganography, so there must be
| something to identify the method used (a generic un-packer).
| The NSA would be naked without one. LOL.
|

Mysterious. So it hides extra bytes? Since each format
is different I don't know of any easy way to track it, or
to create the hidden text.


  #29  
Old February 14th 20, 01:12 AM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Does the .png image format have a text metadata field?

"Java Jive" wrote

| TIFF files are *MUCH* bigger than PNG, for example 22.1Mb as opposed to
| 8.24MB for the same picture.

It sounds like you have a lot more experience than I do,
but I don't see that. A TIF is basically a zipped BMP. I
just tried converting a 252 KB PNG to TIF and got 217 KB.
Then I tried saving a 5 MB JPG image with IrfanView
(52 MB BMP). 4 MB for the TIF. 21 MB for the PNG. That's
with compression level 6 and no transparency color. Though
I assume PNG has to save the alpha channel anyway.
So no advantage there.


  #30  
Old February 14th 20, 01:28 AM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Java Jive
external usenet poster
 
Posts: 391
Default Does the .png image format have a text metadata field?

On 14/02/2020 00:12, Mayayana wrote:

"Java Jive" wrote

TIFF files are *MUCH* bigger than PNG, for example 22.1Mb as opposed to
8.24MB for the same picture.


It sounds like you have a lot more experience than I do,
but I don't see that. A TIF is basically a zipped BMP. I
just tried converting a 252 KB PNG to TIF and got 217 KB.
Then I tried saving a 5 MB JPG image with IrfanView
(52 MB BMP). 4 MB for the TIF. 21 MB for the PNG. That's
with compression level 6 and no transparency color. Though
I assume PNG has to save the alpha channel anyway.
So no advantage there.


I only know for sure what I posted earlier, but it may be relevant that
most of the TIFFs I've encountered have been conversions from the native
image formats of Canon S40 and Nikon D5600 cameras. The example earlier
was a TIFF from a CRAW image format of the Canon, converted to TIFF and
by Canon's own software that came with the camera from an images saved
by the camera as RAW rather than JPEG, and thence to PNG for use on my
web site. For a Nikon example: 24.6MB NEF (I *think* their version of
TIFF, but it could be their version of RAW) comes out as 10.MB PNG.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 11:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.