News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Image meta data viewer

Started by jj2007, November 29, 2016, 01:32:03 PM

Previous topic - Next topic

jj2007

Some images, especially from digital cameras, have a lot of embedded information. Here is an example (and no, I don't own any iCrap - this is not one of my photos):
ASCII  EquipMake                   Apple
ASCII  EquipModel                  iPhone 5
SHORT  Orientation                 1
Ratio  XResolution                 72.000 or 72/1
Ratio  YResolution                 72.000 or 72/1
SHORT  ResolutionUnit              2
ASCII  SoftwareUsed                8.4.1
ASCII  DateTime                    2016:04:24 16:59:18
Type 4 JPEGInterFormat             1098/0000044A
Type 4 JPEGInterLength             2533/000009E5
SHORT  YCbCrPositioning            1
BYTE   ThumbnailData               255
SHORT  ThumbnailCompression        6
Ratio  ThumbnailResolutionX        72.000 or 72/1
Ratio  ThumbnailResolutionY        72.000 or 72/1
SHORT  ThumbnailResolutionUnit     2
SHORT  LuminanceTable              2
SHORT  ChrominanceTable            2
Ratio  ExifExposureTime            0.0012903 or 1/775
Ratio  ExifFNumber                 2.4000 or 12/5
SHORT  ExifExposureProg            2
SHORT  ExifISOSpeed                50
Undef$ ExifVer                     0221
ASCII  ExifDTOrig                  2016:04:24 16:59:18
ASCII  ExifDTDigitized             2016:04:24 16:59:18
Undef  ExifCompConfig              197121/00030201
Ratio  ExifShutterSpeed            9.5973 or 12774/1331
Ratio  ExifAperture                2.5261 or 4845/1918
Ratio  ExifBrightness              8.5695 or 11843/1382
Ratio  ExifExposureBias            0.0 or 0/1
SHORT  ExifMeteringMode            5
SHORT  ExifFlash                   16
Ratio  ExifFocalLength             4.1200 or 103/25
SHORT  ExifSubjectArea             1078
Undef$ ExifMakerNote               Apple iOS
ASCII  ExifDTOrigSS                784
ASCII  ExifDTDigSS                 784
Undef$ ExifFPXVer                  0100
SHORT  ExifColorSpace              1
Type 4 ExifPixXDim                 3264/00000CC0
Type 4 ExifPixYDim                 2448/00000990
SHORT  ExifSensingMethod           2
Undef  ExifSceneType               1/00000001
SHORT  ExifExposureMode            0
SHORT  ExifWhiteBalance            0
SHORT  ExifFocalLengthIn35mmFilm   33
SHORT  ExifSceneCaptureType        0


The attached viewer shows this info in a console window. I checked it partly with Jeffrey's Image Metadata Viewer.

I also noticed that my version of Paint Shop Pro eliminates all this information mercilessly when saving a photo :(

You can drag a list of photos over the exe, or start it standalone in a folder with files in jpg, gif or png format. Cursor left/right scrolls through the images. The second attachment, proptags.lst, must be in the same folder, unless you have VC Express 2010 installed (in that case, the main exe will generate the list).

hutch--

JJ,

I get a fatal error when trying to execute the EXE file.

"Could not open"

"for Recall, FileRead$ etc.."

I downloaded both files and unzipped them in the same directory.

jj2007

It needs images. Either you drag them over the exe from some folder, or you put them into the folder.

TWell


jj2007


avcaballero

It can load a jpg but not a gif. Fortunately I'm the unique with this behaviour. I get somethig like this:
Quote## Line 26: image could not be loaded ##

TWell

What encodes your OS give ?
Clsid:    {557CF402-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CB0-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in GIF Codec
FormatDescription: GIF
FilenameExtension: *.GIF
MimeType: image/gif
Version:  1

avcaballero

This is the entire encode
Quote
>gdiplusencoders
Clsid:    {557CF400-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CAB-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in BMP Codec
FormatDescription: BMP
FilenameExtension: *.BMP;*.DIB;*.RLE
MimeType: image/bmp
Version:  1

Clsid:    {557CF401-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CAE-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in JPEG Codec
FormatDescription: JPEG
FilenameExtension: *.JPG;*.JPEG;*.JPE;*.JFIF
MimeType: image/jpeg
Version:  1

Clsid:    {557CF402-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CB0-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in GIF Codec
FormatDescription: GIF
FilenameExtension: *.GIF
MimeType: image/gif
Version:  1

Clsid:    {557CF405-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CB1-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in TIFF Codec
FormatDescription: TIFF
FilenameExtension: *.TIF;*.TIFF
MimeType: image/tiff
Version:  1

Clsid:    {557CF406-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CAF-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in PNG Codec
FormatDescription: PNG
FilenameExtension: *.PNG
MimeType: image/png
Version:  1

jj2007

Here are mine. They are all identical: the built-in GDI+ encoders. Question is really why caballero's GIF encoder doesn't work.

Clsid:    {557CF400-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CAB-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in BMP Codec
FormatDescription: BMP
FilenameExtension: *.BMP;*.DIB;*.RLE
MimeType: image/bmp
Version:  1

Clsid:    {557CF401-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CAE-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in JPEG Codec
FormatDescription: JPEG
FilenameExtension: *.JPG;*.JPEG;*.JPE;*.JFIF
MimeType: image/jpeg
Version:  1

Clsid:    {557CF402-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CB0-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in GIF Codec
FormatDescription: GIF
FilenameExtension: *.GIF
MimeType: image/gif
Version:  1

Clsid:    {557CF405-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CB1-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in TIFF Codec
FormatDescription: TIFF
FilenameExtension: *.TIF;*.TIFF
MimeType: image/tiff
Version:  1

Clsid:    {557CF406-1A04-11D3-9A73-0000F81EF32E}
FormatID: {B96B3CAF-0728-11D3-9D7B-0000F81EF32E}
CodecName: Built-in PNG Codec
FormatDescription: PNG
FilenameExtension: *.PNG
MimeType: image/png
Version:  1

avcaballero

Well, I'd say that my gifencoder does work (I can see that in in ie, for example), perhaps it's all that I don't have masmbasic installed.

TWell

#10
DELETED

jj2007

Quote from: caballero on November 30, 2016, 04:01:37 AM
Well, I'd say that my gifencoder does work (I can see that in in ie, for example), perhaps it's all that I don't have masmbasic installed.

Mine works fine on a drive where MasmBasic is not installed. IE may have its own decoder.

Did you ever write code with GdipCreateBitmapFromFile or GdipCreateBitmapFromStream and use it with GIFs?

Tim uses GdipLoadImageFromFile, while I load the file into memory and then use GdipCreateBitmapFromStream, the reason being that you can't modify and save an image that was loaded with GdipLoadImageFromFile.

avcaballero

> Twell
Your example gives me Error 3, OutOfMemory

> JJ
No, I haven't ever written such codes. I only use gdi, so only manage bmp

jj2007

Quote from: caballero on November 30, 2016, 04:44:14 AM
> Twell
Your example gives me Error 3, OutOfMemory

I get no error, but if I a take an arbitrary little text file and name it test1.gif, Tim's proggie gives me error 3, too.

Attached a version that uses only embedded images, starting with a tiff, then a jpg, the rest are GIFs. I've also refined the error message, it now reports the true gdistatus message.

HSE

Perfect here. No problem with Tim's test1.gif
Equations in Assembly: SmplMath