473,513 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Identify JPG files

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
Jun 15 '07 #1
6 1565
Mobileboy36 wrote:
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?

--

(O)enone
Jun 15 '07 #2
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...
"Mobileboy36" <Mo*********@gmail.coma écrit dans le message de news:
46***********************@news.skynet.be...
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


Jun 15 '07 #3
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

Jun 15 '07 #4
On Jun 15, 8:29 am, "Mobileboy36" <Mobilebo...@gmail.comwrote:
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.

Jun 15 '07 #5
On Jun 15, 3:06 pm, z...@construction-imaging.com wrote:
On Jun 15, 8:29 am, "Mobileboy36" <Mobilebo...@gmail.comwrote:
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.
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.

Jun 15 '07 #6
Thank you all for the reactions...
thanks for the keyword "EXIF"

<za***@construction-imaging.comschreef in bericht
news:11**********************@g4g2000hsf.googlegro ups.com...
On Jun 15, 8:29 am, "Mobileboy36" <Mobilebo...@gmail.comwrote:
>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.

Jun 18 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
487
by: DraguVaso | last post by:
Hi, I want my application do different actions depending on the exception it gets. For exemple: I have an SQL-table with a unique index. In case I try to Insert a record that's alreaddy in it I...
4
1803
by: Josh Carlisle | last post by:
I've been tasked with developing a document/file versioning system of sorts. Similar to a very scaled down source control system. We're integrating it very closely with an existing application so...
4
1929
by: Eric | last post by:
Hi, I need to find a way to identify between a few different file formats WITHOUT looking at the file extension. Very often our customers will name file incorrectly. For example, they'll send us...
2
1546
by: Shilpa | last post by:
Hi All, I want to write C# code to identify a file type and open the file in the associated editor. For example, text files should be identified and opened in notepad, html should be opened in...
3
3586
by: Shilpa | last post by:
Hi All, I want to write C# code to identify a file type and open the file in the associated editor. For example, text files should be identified and opened in notepad, html should be opened in...
9
3476
by: Pardha | last post by:
can any one help me out in writing a c code for identifying all the functions present and the number of arguments taken by each function in a given .C file???? Regards, Pardha
2
22872
by: h112211 | last post by:
Hi, I installed the newest available PIL (1.1.5 for Python 2.4) from their site, but cannot seem to open any files. The following from PIL import Image i =...
7
3310
by: exapplerep | last post by:
I teach a class in MS Access 2003 to college students. I've had some issues with students turning in .mdb files that were created by other students and then only slightly modified to give some...
16
3719
by: Alan Jones | last post by:
Hello everyone, any help would be greatly appreciated. :) What I'm trying to do may not be advisable, but here goes... I want a page named signature.php to appear conditionally as an include...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.