Re: Properties of a jpg

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Greetings Michel,

Your code is amazing and I have more questions.
How do I access values in other properties of the jpg ?
Eg. I use the Subject field to hold the art genre.

Looking at your code, does this imply one can also add information
into a jpg using VBA ?

Would you care to explain what is happening in your code ?
Is there a jpg document on the Net that documents that structure
of a jpg and how one accesses these values ?

Thanks,

Michael Singmin

=============================================================
"Michel Pierron" <michel.pierron@xxxxxxx> wrote:

>Hi Michael,
>You can try:
>
>Sub TestExample()
>MsgBox JpgComment("c:\MyFile.jpg")
>End Sub
>
>Private Function JpgComment$(sFile$)
>With CreateObject("Shell.Application") _
>.NameSpace(Left$(sFile, lPosition(sFile, "\") - 1))
>JpgComment = .GetDetailsOf(.ParseName(Dir$(sFile)), 14)
>End With
>End Function
>
>Private Function lPosition%(Chain$, Char$)
>Dim iPos%
>Do
>iPos = InStr(lPosition + 1, Chain, Char, 1)
>If iPos Then lPosition = iPos Else Exit Do
>Loop
>End Function
>
>Regards,
>MP
>
>"Michael Singmin" <msing@xxxxxxxxxx> a écrit dans le message de news:
>igbea1lo9b8572jtjlmb4971t15st4rqau@xxxxxxxxxx
>> Hello Group,
>>
>> Can one use VBA to extract certain properties of a jpg file that have
>> been added from Xp Explorer ?
>>
>> I have collected tons of fine art images from web museums and I have
>> used the comment field in Explorer to record the year. While in
>> Explorer, I can easily sort the images in chronologiocal order.
>>
>> I can display the art in Excel easily and I would like to extract any
>> information I place in the jpg.
>>
>> Thanks,
>>
>> Michael Singmin
>>
>

.



Relevant Pages

  • Re: Properties of a jpg
    ... Hi Michael, ... Private Function JpgComment$ ... If iPos Then lPosition = iPos Else Exit Do ... > How do I access values in other properties of the jpg? ...
    (microsoft.public.excel.programming)
  • Re: Properties of a jpg
    ... Sub TestExample() ... Private Function lPosition% ... If iPos Then lPosition = iPos Else Exit Do ... > used the comment field in Explorer to record the year. ...
    (microsoft.public.excel.programming)
  • Re: Cant open pictures
    ... are you sure there are a couple of dozen jpgs on the ... Are only 4 images seen by Windows? ... programs and the jpg you're trying to open is not too large. ... > I'm having trouble opening pictures using my Windows Explorer. ...
    (microsoft.public.windowsxp.photos)
  • Re: File sizes, can anybody explain
    ... Explorer knows nothing about pixels, ... I have a shot of the moon which I took with my D70. ... explorer reports the size of the jpg as ... if I could get a reasonable shot at all else I would have saved it as a ...
    (rec.photo.digital)
  • Re: opening images in IE 6
    ... > REG file ... > Restore JPEG Preview capability in Explorer. ... >> pictures the message was no program associated with these pictures. ... >> for jpg to IExplorer. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)