Identify JPG files

M

Mobileboy36

I'm searching a way to identify jpg files from a digital cam

Let's say we have 2 digital cameras C1 and C2 and 2 files JPG001.jpg from C1
and JPG001.jpg from C2. Is there a way to distinct the 2 files from each
other, reading a certain position in the stream of bytes? Or better, does
anyone have a example piece of vb.net code?



best regards,

Mobileboy
 
O

\(O\)enone

Mobileboy36 said:
Let's say we have 2 digital cameras C1 and C2 and 2 files JPG001.jpg
from C1 and JPG001.jpg from C2. Is there a way to distinct the 2
files from each other, reading a certain position in the stream of
bytes? Or better, does anyone have a example piece of vb.net code?

Would being able to identify the make and model of the camera that took each
picture be of any use?
 
P

Patrice

At which location ? If they have the same name they can't be in the same
directory so what is the purpose of distinguishing them if each cam already
has its own directory ?

If you talked more about processing JPG files coming all in the same
directory under distinct names, the JPG file format allows AFAIK to include
metadata such as the camera model (not sure it you could distinguish them if
they are of the same model). Check a spec to find out the relevant "tags"
and you should be able to do a more precise google seach to find out
relevant code...

You may want to explain what you are trying to do (especially if both camera
are of the same model). I would try to separe files when they are copied on
the PC...
 
P

Phillip Ross Taylor

What your saying is, when you move pictures off a camera, the file
saves new pictures reusing the picture1,2,3 format, so you want to
identify if the pictures are new, or if they have sat on the camera
between connections and aren't new. Is that what your trying to do?

The easiest to compare to files is to open them both and wait until
you see a change


Open file 1
Open file 2

eof1 = false
eof2 = false
diff = false 'assume the same

while (eof1 or eof2 or diff)

read from 1
read from 2

if 1 <> 2 or EOF then blah blah blah

end while

close 1
close 2

if (diff) then
'A different picture
else
'The same picture as the other one.
end if
 
Z

zacks

I'm searching a way to identify jpg files from a digital cam

Let's say we have 2 digital cameras C1 and C2 and 2 files JPG001.jpg from C1
and JPG001.jpg from C2. Is there a way to distinct the 2 files from each
other, reading a certain position in the stream of bytes? Or better, does
anyone have a example piece of vb.net code?

JPG files support a multitude of embedded imformation called EXIF
data. Naturally, you do not see this data when you just view the image
itself. But a program can retrieve it. Virtually all of today's
digital cameras support EXIF and create the JPGs with the EXIF data
there. When you cycle through the images while they are still in the
camera there is probably a button you can press that displays when the
photo was taken and varous camera settings at the time it was taken.
That is the EXIF data. Once the JPG reaches your computer this EXIF
data is still there and can be interpeted. Download the freeware
program FastStone to see how this data can be viewed with an image
editor. You can write code in your VB.NET program to display this EXIF
data but I have not taken the time to write anything like that because
my primary digital camera has a flaw that causes it to not store a key
piece of information (ISO) so I have put that project off. But there
are various EXIF DLLs you can get, just do a Google search on EXIF
Software.
 
Z

zacks

JPG files support a multitude of embedded imformation called EXIF
data. Naturally, you do not see this data when you just view the image
itself. But a program can retrieve it. Virtually all of today's
digital cameras support EXIF and create the JPGs with the EXIF data
there. When you cycle through the images while they are still in the
camera there is probably a button you can press that displays when the
photo was taken and varous camera settings at the time it was taken.
That is the EXIF data. Once the JPG reaches your computer this EXIF
data is still there and can be interpeted. Download the freeware
program FastStone to see how this data can be viewed with an image
editor. You can write code in your VB.NET program to display this EXIF
data but I have not taken the time to write anything like that because
my primary digital camera has a flaw that causes it to not store a key
piece of information (ISO) so I have put that project off. But there
are various EXIF DLLs you can get, just do a Google search on EXIF
Software.

On your specific question, the name of the camera is also in the EXIF
data, but from my own personal experiance, it would be the same value
for two cameras which are the same identical make and model. So, even
the EXIF data for two JPGs from two different cameras that were the
same make and model would be the same. You would be able to tell the
difference if the cameras were different makes and/or models.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top