Access Image Database and Extended File Properties.
Access Image Database and Extended File Properties.
am 15.10.2007 13:37:43 von redpears007
I have been looking, without success, for answers for two specific
questions regardin my image database.
1. Is there a way of reszing the image displayed on a form so that it
is in effect resized to a thumbnail, without altering the original
file?
My experience has shown that access does not display an image
correctly if it is bigger than 1000x1000 pixels. (it is distorted and
sometimes unviewable). Yes i could create a thumbnail for each image,
but there are 1000s of them. I therefore need a method that will
resize the displayed image and not alter the original file. It is
currently set to open in its host application on dblClick. I have
looked at the PaintPicture method and the examples i have seen seem to
be only applicable to individual images. Any help or ideas there would
be greatly appreciated.
2. Can you extract the image file properties, such as Title, Author,
Date etc, and import it into an access table?
Currently images do not need to be added to the Db manually, It is
used by a firm who are loading lots of images a day. The Db has been
set up to run a module that runs through the image files folders and
adds each image to the image table programatically. This works fine.
The form is designed to display the image and all associated info
about that image.
The snag is that before we had the database, whenever we added images
to the image folder we would always add the detail and associated
information in File Properties\Summary, such as Title, Author,
Comments, Date etc. This was to ensure there was no confusion about
the image subject.
So the ideal scenario would be to add some extra code to my module to
extract those file summaries to the table. I have seen some articles
on ExtendedProperties, which seem to be along the right lines but all
examples i have seen are to read those attributes only, i can find
nothing that lets you extract and append those items elsewhere.
I have to bear in mind that once the user has added a photo to the
Image Folder, the image won't be displayed until the addImages module
has run, and the next time they use the database will be to find an
image and its associated data. At the moment it is likely that this
data won't be there unless it has been extracted programmatically from
the extended File properties.
Hope i haven't made what i am after too complicated. Any thoughts or
new ways of approaching the problem will make my day!
Thanks for your time.
Re: Access Image Database and Extended File Properties.
am 15.10.2007 16:43:07 von OldPro
On Oct 15, 6:37 am, redpears...@hotmail.com wrote:
> I have been looking, without success, for answers for two specific
> questions regardin my image database.
>
> 1. Is there a way of reszing the image displayed on a form so that it
> is in effect resized to a thumbnail, without altering the original
> file?
>
> My experience has shown that access does not display an image
> correctly if it is bigger than 1000x1000 pixels. (it is distorted and
> sometimes unviewable). Yes i could create a thumbnail for each image,
> but there are 1000s of them. I therefore need a method that will
> resize the displayed image and not alter the original file. It is
> currently set to open in its host application on dblClick. I have
> looked at the PaintPicture method and the examples i have seen seem to
> be only applicable to individual images. Any help or ideas there would
> be greatly appreciated.
>
> 2. Can you extract the image file properties, such as Title, Author,
> Date etc, and import it into an access table?
>
> Currently images do not need to be added to the Db manually, It is
> used by a firm who are loading lots of images a day. The Db has been
> set up to run a module that runs through the image files folders and
> adds each image to the image table programatically. This works fine.
> The form is designed to display the image and all associated info
> about that image.
>
> The snag is that before we had the database, whenever we added images
> to the image folder we would always add the detail and associated
> information in File Properties\Summary, such as Title, Author,
> Comments, Date etc. This was to ensure there was no confusion about
> the image subject.
>
> So the ideal scenario would be to add some extra code to my module to
> extract those file summaries to the table. I have seen some articles
> on ExtendedProperties, which seem to be along the right lines but all
> examples i have seen are to read those attributes only, i can find
> nothing that lets you extract and append those items elsewhere.
>
> I have to bear in mind that once the user has added a photo to the
> Image Folder, the image won't be displayed until the addImages module
> has run, and the next time they use the database will be to find an
> image and its associated data. At the moment it is likely that this
> data won't be there unless it has been extracted programmatically from
> the extended File properties.
>
> Hope i haven't made what i am after too complicated. Any thoughts or
> new ways of approaching the problem will make my day!
>
> Thanks for your time.
Is this a trick question? Use the image control with the SizeMode set
to Stretch. As far as the author, how would it know that? What kind
of image has the author incoded in the graphic file? Not bitmap or
gif. You can certainly read the date, size, and name of the file.
Re: Access Image Database and Extended File Properties.
am 15.10.2007 17:03:25 von redpears007
On 15 Oct, 15:43, OldPro wrote:
> On Oct 15, 6:37 am, redpears...@hotmail.com wrote:
>
>
>
>
>
> > I have been looking, without success, for answers for two specific
> > questions regardin my image database.
>
> > 1. Is there a way of reszing the image displayed on a form so that it
> > is in effect resized to a thumbnail, without altering the original
> > file?
>
> > My experience has shown that access does not display an image
> > correctly if it is bigger than 1000x1000 pixels. (it is distorted and
> > sometimes unviewable). Yes i could create a thumbnail for each image,
> > but there are 1000s of them. I therefore need a method that will
> > resize the displayed image and not alter the original file. It is
> > currently set to open in its host application on dblClick. I have
> > looked at the PaintPicture method and the examples i have seen seem to
> > be only applicable to individual images. Any help or ideas there would
> > be greatly appreciated.
>
> > 2. Can you extract the image file properties, such as Title, Author,
> > Date etc, and import it into an access table?
>
> > Currently images do not need to be added to the Db manually, It is
> > used by a firm who are loading lots of images a day. The Db has been
> > set up to run a module that runs through the image files folders and
> > adds each image to the image table programatically. This works fine.
> > The form is designed to display the image and all associated info
> > about that image.
>
> > The snag is that before we had the database, whenever we added images
> > to the image folder we would always add the detail and associated
> > information in File Properties\Summary, such as Title, Author,
> > Comments, Date etc. This was to ensure there was no confusion about
> > the image subject.
>
> > So the ideal scenario would be to add some extra code to my module to
> > extract those file summaries to the table. I have seen some articles
> > on ExtendedProperties, which seem to be along the right lines but all
> > examples i have seen are to read those attributes only, i can find
> > nothing that lets you extract and append those items elsewhere.
>
> > I have to bear in mind that once the user has added a photo to the
> > Image Folder, the image won't be displayed until the addImages module
> > has run, and the next time they use the database will be to find an
> > image and its associated data. At the moment it is likely that this
> > data won't be there unless it has been extracted programmatically from
> > the extended File properties.
>
> > Hope i haven't made what i am after too complicated. Any thoughts or
> > new ways of approaching the problem will make my day!
>
> > Thanks for your time.
>
> Is this a trick question? Use the image control with the SizeMode set
> to Stretch. As far as the author, how would it know that? What kind
> of image has the author incoded in the graphic file? Not bitmap or
> gif. You can certainly read the date, size, and name of the file.- Hide quoted text -
>
> - Show quoted text -
No, It is not a trick question.
Tried the SizeMode set to Stretch, distorts the images too much, they
are all different sizes, some portrait, some landscape, stretch does
just that and distorts them.
The 'Author' field is the predefined field in the original image file
properties/summary, which you access via the file, right click, then
properties and then summary tab. So it would 'know that' from whatever
the user puts into that field. In this case it is used to record the
photographer for that image. As i said they are all jpgs.
I know you can read those attributes but, as i said, i want to extract
them into a access table.
Sorry if i wasn't clear enough.
Re: Access Image Database and Extended File Properties.
am 15.10.2007 18:25:31 von Daron
I just found this link over the weekend regarding extended file
properties:
- http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_ lunl.mspx?mfr=true
This should help with part of your question.
>
> > 2. Can you extract the image file properties, such as Title, Author,
> > Date etc, and import it into an access table?
>
> > Currently images do not need to be added to the Db manually, It is
> > used by a firm who are loading lots of images a day. The Db has been
> > set up to run a module that runs through the image files folders and
> > adds each image to the image table programatically. This works fine.
> > The form is designed to display the image and all associated info
> > about that image.
>
> > The snag is that before we had the database, whenever we added images
> > to the image folder we would always add the detail and associated
> > information in File Properties\Summary, such as Title, Author,
> > Comments, Date etc. This was to ensure there was no confusion about
> > the image subject.
>
> > So the ideal scenario would be to add some extra code to my module to
> > extract those file summaries to the table. I have seen some articles
> > on ExtendedProperties, which seem to be along the right lines but all
> > examples i have seen are to read those attributes only, i can find
> > nothing that lets you extract and append those items elsewhere.
>
>
> Is this a trick question? Use the image control with the SizeMode set
> to Stretch. As far as the author, how would it know that? What kind
> of image has the author incoded in the graphic file? Not bitmap or
> gif. You can certainly read the date, size, and name of the file.
Re: Access Image Database and Extended File Properties.
am 15.10.2007 21:24:27 von redpears007
On 15 Oct, 17:25, Daron wrote:
> I just found this link over the weekend regarding extended file
> properties:
>
> -http://www.microsoft.com/technet/scriptcenter/guide/sas_fil _lunl.mspx...
>
> This should help with part of your question.
>
>
>
>
>
> > > 2. Can you extract the image file properties, such as Title, Author,
> > > Date etc, and import it into an access table?
>
> > > Currently images do not need to be added to the Db manually, It is
> > > used by a firm who are loading lots of images a day. The Db has been
> > > set up to run a module that runs through the image files folders and
> > > adds each image to the image table programatically. This works fine.
> > > The form is designed to display the image and all associated info
> > > about that image.
>
> > > The snag is that before we had the database, whenever we added images
> > > to the image folder we would always add the detail and associated
> > > information in File Properties\Summary, such as Title, Author,
> > > Comments, Date etc. This was to ensure there was no confusion about
> > > the image subject.
>
> > > So the ideal scenario would be to add some extra code to my module to
> > > extract those file summaries to the table. I have seen some articles
> > > on ExtendedProperties, which seem to be along the right lines but all
> > > examples i have seen are to read those attributes only, i can find
> > > nothing that lets you extract and append those items elsewhere.
>
> > Is this a trick question? Use the image control with the SizeMode set
> > to Stretch. As far as the author, how would it know that? What kind
> > of image has the author incoded in the graphic file? Not bitmap or
> > gif. You can certainly read the date, size, and name of the file.- Hide quoted text -
>
> - Show quoted text -
Thank you Daron, thats an excellent link, although i am going to have
to do some more head scratching, as its not getting the data into the
table, but its a start to solving the problem and i've been
researching and tweaking code all day to try and get a result, but hey
ho thats the world of access for you :)
I hope someone out there will have a 'miracle solution' and save me
from my PC :)
Thanks again
Re: Access Image Database and Extended File Properties.
am 16.10.2007 01:24:54 von Chuck Grimsby
On Mon, 15 Oct 2007 07:43:07 -0700, OldPro
wrote:
>On Oct 15, 6:37 am, redpears...@hotmail.com wrote:
>> 2. Can you extract the image file properties, such as Title, Author,
>> Date etc, and import it into an access table?
>Is this a trick question? Use the image control with the SizeMode set
>to Stretch. As far as the author, how would it know that? What kind
>of image has the author incoded in the graphic file? Not bitmap or
>gif. You can certainly read the date, size, and name of the file.
Jpegs, png, and many (many!) other image formats have all sorts of
properties in the file itself that include things like "Author",
"Copyright", "comments", etc. In addition, this sort of information
is sometimes encrypted into the file itself for the purposes of
copyright protection (and encrypted communication!). (Actually, for
you sticklers out there, all this stuff is stored as metadata, but
let's not confuse people too much.)
The standard (exposed) properties can be retrieved from the image file
by the means of a few API calls. If memory serves, there are a couple
of examples at both DevX and Randy Birch's site
(http://vbnet.mvps.org/).
Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!
Re: Access Image Database and Extended File Properties.
am 16.10.2007 06:07:27 von Larry Linson
wrote
>> Is this a trick question? Use the image control with the SizeMode set
>> to Stretch. As far as the author, how would it know that? What kind
>> of image has the author incoded in the graphic file? Not bitmap or
>> gif. You can certainly read the date, size, and name of the file.- Hide
quoted text -
>>
>> - Show quoted text -
>
> No, It is not a trick question.
>
> Tried the SizeMode set to Stretch, distorts the images too much, they
> are all different sizes, some portrait, some landscape, stretch does
> just that and distorts them.
"Zoom" fills the control in whichever dimension fills first and preserves
the aspect ratio so it does not distort. "Stretch" does just what it says,
it stretches the height and width separately to fill the control, which most
will distort the picture unless the picture and control are of identical
aspect ratio, e.g., both square or both rectanglular with height the same
multiple of width. I've never found a good use for Stretch.
Larry Linson
Microsoft Access MVP
Re: Access Image Database and Extended File Properties.
am 16.10.2007 23:22:07 von OldPro
On Oct 15, 11:07 pm, "Larry Linson" wrote:
> wrote
>
> >> Is this a trick question? Use the image control with the SizeMode set
> >> to Stretch. As far as the author, how would it know that? What kind
> >> of image has the author incoded in the graphic file? Not bitmap or
> >> gif. You can certainly read the date, size, and name of the file.- Hide
> quoted text -
> >>
> >> - Show quoted text -
> >
> > No, It is not a trick question.
> >
> > Tried the SizeMode set to Stretch, distorts the images too much, they
> > are all different sizes, some portrait, some landscape, stretch does
> > just that and distorts them.
>
> "Zoom" fills the control in whichever dimension fills first and preserves
> the aspect ratio so it does not distort. "Stretch" does just what it says,
> it stretches the height and width separately to fill the control, which most
> will distort the picture unless the picture and control are of identical
> aspect ratio, e.g., both square or both rectanglular with height the same
> multiple of width. I've never found a good use for Stretch.
>
> Larry Linson
> Microsoft Access MVP
live and learn. ;-)