12 Replies Latest reply on Oct 7, 2009 11:58 AM by TSGal

    how does FM store images in the database?

    DonorTracker

      Title

      how does FM store images in the database?

      Post

      I generally have FileMakerPro 10 Advanced Mac store my images and pdfs in containers via a link to the file, rather than storing the image/pdf in the database. This keeps my database small and easy to backup, and the image/pdf files accessible should anything happen to the database.

       

      But recently I thought I would store small, thumbnail-size images photos of the people in my dataset inside the database. The images are only 10K jpgs, so I thought, "what's the harm".

       

      But I was surprised to find that each time I add a new 10K jpg, my database appears to grow in size by about 100K.  So my question is: how is FM storing these tiny images, and why does it grow so much, and is there a better format to use than jpg?  I'm open to gif, png, or whatever.

        • 1. Re: how does FM store images in the database?
          MikeyG79
            

          I've seen somewhere to save images as 8bit. Don't know if that helps.

          It would be nice if FM containers were compressed in some way. Have a customer with 1500 records (1 container in each amungst others "normal fields") and the DB is over 13gigs. That's about 8megs per file, but no file is larger than 1.5meg. 

          • 2. Re: how does FM store images in the database?
            bhoutman
              

            I'm new to FileMaker, and not quite sure how the Container field stores images, but I know that in MS Access, the OLE field used to store/link to images converts jpgs (and all other supported image files) to generic Objects and then saves the rendering information (even if you link rather than embed the image), which is quite a bit larger than the original jpg itself. I suspect something similar occurs in Container fields. In MS Access you can work around that problem by using a static image in your Form/Report and a VBA module that replaces that static image with one specified by the file name in a text field, but since FileMaker requires layouts to be based on table occurrences, there's nothing really like the static image field to work with, as far as I've been able to tell.

             

            The closest I've come is using the web viewer tool and pointing it to the jpg file (this also allows you to set up a calculation that fetches the path to your FileMaker database and replaces the FileMaker filename with the jpg file name (provided they're always kept in the same directory), so they're still linked even if you move the directory - which is not the case if you use the Container field and link to a reference to the object). The catch to this is that your jpgs all have to be roughly the same size - I haven't found a way to resize them to fit the dimensions of the web viewer. I'm also not sure whether this approach would work with a printable report, or only as an onscreen layout.

            • 3. Re: how does FM store images in the database?
              DonorTracker
                 I wonder if FM support staff could shed some light on this issue?  Thanks!
              • 4. Re: how does FM store images in the database?
                etripoli
                   I'm sure I'll be correctly if I'm wrong, but when inserting images into containers, FM converts the images to uncompressed BMP/PICT. 
                • 5. Re: how does FM store images in the database?
                  DonorTracker
                    

                  I'm sure I'll be correctly if I'm wrong, but when inserting images into containers, FM converts the images to uncompressed BMP/PICT.

                   

                  In that case I'll experiment with using pict images and see if the database doesn't bloat as quickly.  Thanks!

                  • 6. Re: how does FM store images in the database?
                    FentonJones
                       There is more than one method to add images to FileMaker container fields. The best way is to use the Insert Picture command. Then you will not get a conversion to BMP/PICT, and a much smaller file (depending on what you Insert; Jpeg much smaller, Tiff not so much). At least that is my experience.
                    • 7. Re: how does FM store images in the database?
                      TSGal

                      All:

                       

                      Sorry for the late reply.  I was hoping to have an answer by now.  I am still pursuing why images take up a lot of space.  When I have an answer, I will post.

                       

                      TSGal

                      FileMaker, Inc. 

                      • 8. Re: how does FM store images in the database?
                        DonorTracker
                          

                        TSGal,

                         

                        Any progress on getting the answer?  Thanks!

                        • 9. Re: how does FM store images in the database?
                          JIRB
                             Our company has recently acquired three licenses of File Maker Pro 10 for the Print Shop.

                          Our department print and distribute more than 2.5 million monthly copies. In order to get more control in our shipments and provide better customer assistance, we want to use handhelds MC70.

                          Are those handhelds compatibles with File Maker? Is there any additional information you could provide us to use this system in a right way?

                          • 10. Re: how does FM store images in the database?
                            TSGal

                            DonorTracker:

                             

                            Sorry for the late reply.  Please send me a sample file so I can try it here.  The information I have received is not clear cut, and I'm having difficulty duplicating the problem.  I would like to try it here with one of your files so I can provide an example.  I have sent you a private message (top of this page - right side - X Messages) with instructions where to send the file.

                             

                            TSGal

                            FileMaker, Inc. 

                            • 11. Re: how does FM store images in the database?
                              davidanders
                                 Could you not import sample jpegs (of verious depths and versions) and gifs and all acceptable file versions) to compare the file references verseses imported versions??
                              • 12. Re: how does FM store images in the database?
                                TSGal

                                All:

                                 

                                Each of the tests I ran did not show a large discrepancy in file size.  Here are my last test results:

                                 

                                Database 1 - 44 tables - 56 layouts - 23,142,400 bytes

                                JPG file 1 - 8K - 7,352 bytes used

                                 

                                Insert JPG file into Container field.  Database file increased to 23,150,592 bytes.  8,192 bytes increase (8K)

                                 

                                Database 2 - 1 table - 1 layout - 1 Container field - 53,248 bytes

                                JPG file 1 - 8K - 7,352 bytes used

                                 

                                Insert JPG file into Container field.  Database file increased to 65,536 bytes.  12,288 bytes increase (12K)

                                 

                                Duplicated the JPG file.  Added a new record and inserted the second file.  Database file increased to 69,632 bytes. 4,096 bytes increase (4K).  Two 8K files increased the file size by 16K.

                                 

                                 

                                There was another similar problem recently reported, where dragging and dropping an iPhoto image into a FileMaker Pro 10 Container field vastly increased the size of the file.

                                 

                                I then put "JPG file 1" into iPhoto, returned to Database 2, created a new record and dragged the image from iPhoto into the Container field.  The file did grow from 69,632 bytes to 106,496 bytes.  An increase of 36,864 bytes.  Therefore, using "Insert -> Picture", the database grows proportionally, but drag and drop from iPhoto increases disproportionally.  Needless to say, this problem occurred with Mac OS.  I was also testing this with Mac OS X 10.5.8.

                                 

                                Sorry this is taking so long to pinpoint the cause, but this is all I have at the moment.

                                 

                                TSGal

                                FileMaker, Inc.