Importing single photos into FMP10 database of images

10 messages Options
Embed this post
Permalink
Landy Atkinson

Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
I have used the Import File script step to import whole folders of  
images and a very important side benefit is that you also get the File  
Name, File Path and Image Thumbnail.  Knowing the image path, lets me  
parse the path to get other useful information based on the directory  
structure (such as the year and topic the imported file came from)  
that I put in the database along with the image.  This is very useful  
in searching the database for the images I want.  {NOTE:  This only  
work because as the images are saved from the camera to the server, I  
am careful about creating a YEAR folder with TOPIC folders inside.}

If I want to import a single image into the database, I have found no  
such nice solution.  The Import Picture script step lets me select the  
desired image and gets it into the container field, but does not let  
me know the FILE NAME or the PATH from whence it came.  Any ideas how  
to set up a script to import single images and also keep track of the  
filename and where it came from?  Getting a thumbnail may be nice for  
a list view of images, but is not all that important to me.

-Landy
Steve B. Gerow

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
Landy,
You can get the info you need from a container with the following exercise:

Insert a picture into a container field ("MyContainer") with "as reference" checked.
Create a calc field, "MyMetadata" with expression: GetAsText ( MyContainer ).

In this calc field you'll see the path, along with other metadata.

Will send you a sample file with does this on the Windows side, but the Mac won't be too different.

--
Steve Gerow
FileMaker 9/8/7 Certified Developer

President
Abrazos Data Consulting, Inc.
Pasadena, California
Member FileMaker Bus. Alliance


>  -------Original Message-------
>  From: Landy Atkinson <[hidden email]>
>  Subject: Importing single photos into FMP10 database of images
>  Sent: Sep 18 '09 10:32
>  
>  I have used the Import File script step to import whole folders of  
>  images and a very important side benefit is that you also get the File  
>  Name, File Path and Image Thumbnail.  Knowing the image path, lets me  
>  parse the path to get other useful information based on the directory  
>  structure (such as the year and topic the imported file came from)  
>  that I put in the database along with the image.  This is very useful  
>  in searching the database for the images I want.  {NOTE:  This only  
>  work because as the images are saved from the camera to the server, I  
>  am careful about creating a YEAR folder with TOPIC folders inside.}
>  
>  If I want to import a single image into the database, I have found no  
>  such nice solution.  The Import Picture script step lets me select the  
>  desired image and gets it into the container field, but does not let  
>  me know the FILE NAME or the PATH from whence it came.  Any ideas how  
>  to set up a script to import single images and also keep track of the  
>  filename and where it came from?  Getting a thumbnail may be nice for  
>  a list view of images, but is not all that important to me.
>  
>  -Landy
>  
Landy Atkinson

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
OK, I will take a look at that over the weekend.  I actually need to  
also import the full images into the database, but having a second  
container field in the database with the reference shouldn't be a big  
space waster!  I think that is essentially what I am doing now with  
the File Path that I get from importing folders full of images.  Now  
all I have to do is figure out how to have a single script pull the  
reference into one container and then import the image into a 2nd  
container with the user only having to select the file once.  Not sure  
I saw a way to programatically select the file to import, but will  
explore.

My goal here is to have the database information survive accidental  
deletion or moving of files on the server.  The images I am saving are  
"proof" images of the transmission through fiber image guides in 3  
stages.  1. when sent to a vendor for packaging, 2. upon return from  
packaging vendor, 3. finished product sent to customer.  I've created  
3 tables in a single database to hold the various images.  We put them  
on the file server in folders separated by year and in each year are  
To Vendor, From Vendor, Finished Scope folders.  An image of an image  
guide will appear in all 3 folders (not necessarily in the same year)  
with the same file name, which is the image guide serial number.  When  
I import an image into the database, I want the year and "to, from,  
finished" info to be automatically recored with the saved image; based  
on it's location in the folder structure.  I've written the database  
such that one Layout is used to import an image and another is used to  
display "triplet" images for quick comparison and confirmation that  
all was well at each step of the build process.

When I import whole folders of images, all works well and the job is  
done.  That takes care of the past.  Now I want a simple scripted  
system, so the QC people can import the images  right after they take  
them.  This means a few at a time, not whole folders full of images.

By the way, both Windows PCs and Macs will be adding images to the  
database and viewing the database.  With the folder import, this all  
seems to be cross platform with no glitches.  I will need to confirm  
that the "save reference only" method is cross platform as well.  
Since I only need the reference to parse information directory  
structure from, it will probably work even if the image doesn't  
actually display correctly due to cross platform path differences.

-Landy

On Sep 18, 2009, at 5:54 PM, Steve B. Gerow wrote:

> Landy,
> You can get the info you need from a container with the following  
> exercise:
>
> Insert a picture into a container field ("MyContainer") with "as  
> reference" checked.
> Create a calc field, "MyMetadata" with expression: GetAsText  
> ( MyContainer ).
>
> In this calc field you'll see the path, along with other metadata.
>
> Will send you a sample file with does this on the Windows side, but  
> the Mac won't be too different.
>
> --
> Steve Gerow
> FileMaker 9/8/7 Certified Developer
>
> President
> Abrazos Data Consulting, Inc.
> Pasadena, California
> Member FileMaker Bus. Alliance
>
>
>> -------Original Message-------
>> From: Landy Atkinson <[hidden email]>
>> Subject: Importing single photos into FMP10 database of images
>> Sent: Sep 18 '09 10:32
>>
>> I have used the Import File script step to import whole folders of
>> images and a very important side benefit is that you also get the  
>> File
>> Name, File Path and Image Thumbnail.  Knowing the image path, lets me
>> parse the path to get other useful information based on the directory
>> structure (such as the year and topic the imported file came from)
>> that I put in the database along with the image.  This is very useful
>> in searching the database for the images I want.  {NOTE:  This only
>> work because as the images are saved from the camera to the server, I
>> am careful about creating a YEAR folder with TOPIC folders inside.}
>>
>> If I want to import a single image into the database, I have found no
>> such nice solution.  The Import Picture script step lets me select  
>> the
>> desired image and gets it into the container field, but does not let
>> me know the FILE NAME or the PATH from whence it came.  Any ideas how
>> to set up a script to import single images and also keep track of the
>> filename and where it came from?  Getting a thumbnail may be nice for
>> a list view of images, but is not all that important to me.
>>
>> -Landy
>>
Steve B. Gerow

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
In reply to this post by Landy Atkinson
I've done this in the past by temporarily importing the picture into a global container in order to derive the path then import the pic into its permanent container.

Importing pics into the file itself is often considered a bad idea because it produces really big files that are constantly changing, therefore new versions are constantly being backed up - filling up the backup medium. People often have a separate file for the pix which is backed up much less often.

FWIW.


--
Steve Gerow
FileMaker 9/8/7 Certified Developer

President
Abrazos Data Consulting, Inc.
Pasadena, California
626.398.1506
Member FileMaker Bus. Alliance


>  -------Original Message-------
>  From: Landy Atkinson <[hidden email]>
>  Subject: Re: Importing single photos into FMP10 database of images
>  Sent: Sep 18 '09 18:38
>  
>  OK, I will take a look at that over the weekend.  I actually need to  
>  also import the full images into the database, but having a second  
>  container field in the database with the reference shouldn't be a big  
>  space waster!  I think that is essentially what I am doing now with  
>  the File Path that I get from importing folders full of images.  Now  
>  all I have to do is figure out how to have a single script pull the  
>  reference into one container and then import the image into a 2nd  
>  container with the user only having to select the file once.  Not sure  
>  I saw a way to programatically select the file to import, but will  
>  explore.
>  
>  My goal here is to have the database information survive accidental  
>  deletion or moving of files on the server.  The images I am saving are  
>  "proof" images of the transmission through fiber image guides in 3  
>  stages.  1. when sent to a vendor for packaging, 2. upon return from  
>  packaging vendor, 3. finished product sent to customer.  I've created  
>  3 tables in a single database to hold the various images.  We put them  
>  on the file server in folders separated by year and in each year are  
>  To Vendor, From Vendor, Finished Scope folders.  An image of an image  
>  guide will appear in all 3 folders (not necessarily in the same year)  
>  with the same file name, which is the image guide serial number.  When  
>  I import an image into the database, I want the year and "to, from,  
>  finished" info to be automatically recored with the saved image; based  
>  on it's location in the folder structure.  I've written the database  
>  such that one Layout is used to import an image and another is used to  
>  display "triplet" images for quick comparison and confirmation that  
>  all was well at each step of the build process.
>  
>  When I import whole folders of images, all works well and the job is  
>  done.  That takes care of the past.  Now I want a simple scripted  
>  system, so the QC people can import the images  right after they take  
>  them.  This means a few at a time, not whole folders full of images.
>  
>  By the way, both Windows PCs and Macs will be adding images to the  
>  database and viewing the database.  With the folder import, this all  
>  seems to be cross platform with no glitches.  I will need to confirm  
>  that the "save reference only" method is cross platform as well.  
>  Since I only need the reference to parse information directory  
>  structure from, it will probably work even if the image doesn't  
>  actually display correctly due to cross platform path differences.
>  
>  -Landy
>  
>  On Sep 18, 2009, at 5:54 PM, Steve B. Gerow wrote:
>  
>  > Landy,
>  > You can get the info you need from a container with the following  
>  > exercise:
>  >
>  > Insert a picture into a container field ("MyContainer") with "as  
>  > reference" checked.
>  > Create a calc field, "MyMetadata" with expression: GetAsText  
>  > ( MyContainer ).
>  >
>  > In this calc field you'll see the path, along with other metadata.
>  >
>  > Will send you a sample file with does this on the Windows side, but  
>  > the Mac won't be too different.
>  >
>  > --
>  > Steve Gerow
>  > FileMaker 9/8/7 Certified Developer
>  >
>  > President
>  > Abrazos Data Consulting, Inc.
>  > Pasadena, California
>  > Member FileMaker Bus. Alliance
>  >
>  >
>  >> -------Original Message-------
>  >> From: Landy Atkinson <[hidden email]>
>  >> Subject: Importing single photos into FMP10 database of images
>  >> Sent: Sep 18 '09 10:32
>  >>
>  >> I have used the Import File script step to import whole folders of
>  >> images and a very important side benefit is that you also get the  
>  >> File
>  >> Name, File Path and Image Thumbnail.  Knowing the image path, lets me
>  >> parse the path to get other useful information based on the directory
>  >> structure (such as the year and topic the imported file came from)
>  >> that I put in the database along with the image.  This is very useful
>  >> in searching the database for the images I want.  {NOTE:  This only
>  >> work because as the images are saved from the camera to the server, I
>  >> am careful about creating a YEAR folder with TOPIC folders inside.}
>  >>
>  >> If I want to import a single image into the database, I have found no
>  >> such nice solution.  The Import Picture script step lets me select  
>  >> the
>  >> desired image and gets it into the container field, but does not let
>  >> me know the FILE NAME or the PATH from whence it came.  Any ideas how
>  >> to set up a script to import single images and also keep track of the
>  >> filename and where it came from?  Getting a thumbnail may be nice for
>  >> a list view of images, but is not all that important to me.
>  >>
>  >> -Landy
>  >>
>  
Emma Glaisher

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
In reply to this post by Landy Atkinson
I have a similar problem. I have imported many folders-full of images into a
database. I hold a thumbnail and the filepath. I use scripts to place the
images into Quark or InDesign.

Now, if 2 or 3 new images are supplied, I would like to be able to import
path and thumbnail directly. As it is I have to move all the existing images
in that folder into a sub-folder, import the parent folder, then move the
others out again.

I've seen image importing done individually using Photoshop but I'd rather
not open that can of worms!

Steve's solution was interesting, but the thousands of images I already have
only store thumbnails, and I can't use that to extract the path.

Any more ideas?

Emma


On 18/9/09 19:32, "Landy Atkinson" <[hidden email]> wrote:

> I have used the Import File script step to import whole folders of
> images and a very important side benefit is that you also get the File
> Name, File Path and Image Thumbnail.  Knowing the image path, lets me
> parse the path to get other useful information based on the directory
> structure (such as the year and topic the imported file came from)
> that I put in the database along with the image.  This is very useful
> in searching the database for the images I want.  {NOTE:  This only
> work because as the images are saved from the camera to the server, I
> am careful about creating a YEAR folder with TOPIC folders inside.}
>
> If I want to import a single image into the database, I have found no
> such nice solution.  The Import Picture script step lets me select the
> desired image and gets it into the container field, but does not let
> me know the FILE NAME or the PATH from whence it came.  Any ideas how
> to set up a script to import single images and also keep track of the
> filename and where it came from?  Getting a thumbnail may be nice for
> a list view of images, but is not all that important to me.
>
> -Landy
>
> ----------------------------------
> Inbound email scanned by Mimecast.
> ----------------------------------
>

-----------------------------------------------------------------------------------------------------------------------------------------
Fourninety Limited, a member company of the Media Square plc group. Registered in England No. 3737606. Registered address Clarence Mill, Clarence Road, Bollington, Cheshire. SK10 5JZ

Confidentiality Notice: The information in this document and any attachments are confidential. It is intended only for the use of the named recipient. If you are not the intended recipient please notify us immediately and delete this document. The contents on this document must not be disclosed to any other person nor may any copies be taken. The views of the author may not represent the views of the Company.

Security Warning: This e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. All liability for any claims arising as a result of using this medium to transmit information by us or to us is excluded to the extent permitted by law.
-----------------------------------------------------------------------------------------------------------------------------------------
Tim Mansour

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
2009/9/21 Emma Glaisher <[hidden email]>:
> Any more ideas?

Which platform Emma? If Mac, AppleScript could do it.

--
Tim Mansour <[hidden email]>
Neologica Print & Promotions ABN 63 904 335 408
Certified FileMaker 10 Developer
Mobile 0405 500 846 : Melbourne in-dial 03 9012 7441
Emma Glaisher

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
Yes, on a Mac and I'm happy with scripting. What approach do you suggest?


On 21/9/09 23:45, "Tim Mansour" <[hidden email]> wrote:

> 2009/9/21 Emma Glaisher <[hidden email]>:
>> Any more ideas?
>
> Which platform Emma? If Mac, AppleScript could do it.

-----------------------------------------------------------------------------------------------------------------------------------------
Fourninety Limited, a member company of the Media Square plc group. Registered in England No. 3737606. Registered address Clarence Mill, Clarence Road, Bollington, Cheshire. SK10 5JZ

Confidentiality Notice: The information in this document and any attachments are confidential. It is intended only for the use of the named recipient. If you are not the intended recipient please notify us immediately and delete this document. The contents on this document must not be disclosed to any other person nor may any copies be taken. The views of the author may not represent the views of the Company.

Security Warning: This e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. All liability for any claims arising as a result of using this medium to transmit information by us or to us is excluded to the extent permitted by law.
-----------------------------------------------------------------------------------------------------------------------------------------
Tim Mansour

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
2009/9/22 Emma Glaisher <[hidden email]>:
> Yes, on a Mac and I'm happy with scripting. What approach do you suggest?

To add an image to the container field "Image", and save its path into
"ImagePath":

set imfile to choose file of type {"public.image"}
set cell "Image" of current record of current layout to imfile
set cell "ImagePath" of current record of current layout to imfile as text

That will place the original image into the container. If you want to
insert a thumbnail instead, one way to generate it is to use Image
Events. There's a good run-down of this at:

http://www.macosxautomation.com/applescript/imageevents/

Feel free to contact me directly if you need more help.

--
Tim Mansour <[hidden email]>
Neologica Print & Promotions ABN 63 904 335 408
Certified FileMaker 10 Developer

"Be it ever so humble, there's no opinion like one's own." -- Anonymous
Emma Glaisher

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
That works a treat! And thanks for the link to that wonderfully clear site.
I have to confess I've never heard of Image Events before, but I think it
could be useful in lots of ways. Eventually I'll work towards a script which
saves out a thumbnail and places that, but in the meantime your script will
help a lot.

Cheers Tim, I owe you a drink!


On 22/9/09 23:15, "Tim Mansour" <[hidden email]> wrote:

> 2009/9/22 Emma Glaisher <[hidden email]>:
>> Yes, on a Mac and I'm happy with scripting. What approach do you suggest?
>
> To add an image to the container field "Image", and save its path into
> "ImagePath":
>
> set imfile to choose file of type {"public.image"}
> set cell "Image" of current record of current layout to imfile
> set cell "ImagePath" of current record of current layout to imfile as text
>
> That will place the original image into the container. If you want to
> insert a thumbnail instead, one way to generate it is to use Image
> Events. There's a good run-down of this at:
>
> http://www.macosxautomation.com/applescript/imageevents/
>
> Feel free to contact me directly if you need more help.

-----------------------------------------------------------------------------------------------------------------------------------------
Fourninety Limited, a member company of the Media Square plc group. Registered in England No. 3737606. Registered address Clarence Mill, Clarence Road, Bollington, Cheshire. SK10 5JZ

Confidentiality Notice: The information in this document and any attachments are confidential. It is intended only for the use of the named recipient. If you are not the intended recipient please notify us immediately and delete this document. The contents on this document must not be disclosed to any other person nor may any copies be taken. The views of the author may not represent the views of the Company.

Security Warning: This e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. All liability for any claims arising as a result of using this medium to transmit information by us or to us is excluded to the extent permitted by law.
-----------------------------------------------------------------------------------------------------------------------------------------
Tim Mansour

Re: Importing single photos into FMP10 database of images

Reply Threaded More More options
Print post
Permalink
2009/9/23 Emma Glaisher <[hidden email]>:
> Cheers Tim, I owe you a drink!

You're welcome Emma. I can highly recommend a pinot noir from
Australia's southern states :-)

--
Tim Mansour <[hidden email]>
Neologica Print & Promotions ABN 63 904 335 408
Certified FileMaker 10 Developer