1 2 Previous Next 17 Replies Latest reply on Apr 11, 2017 3:43 PM by tjmp

    GetThumbnail is Cropping the Image

    tjmp

      Hi,

       

      I'm trying to resize the contents of a container field using the GetThumbnail function. The problem is that the "thumbnail" is being cropped, regardless of the Data Formatting setup for the container field. I'm setting up a container field to auto-calculate and resize the data, but cannot have it kick in until it stops cropping. I have made a file for testing with 2 container fields and their attributes side by side and am attaching it here for anyone who might be able to help. Would someone please help me out with a solution as soon as possible?

       

      Thanks

        • 1. Re: GetThumbnail is Cropping the Image
          keywords

          I've had a look at your file and can't see what the issue is. If I change either of the values in your yellow fields I get a thumbnail image. Isn't that what you are trying to achieve? And by the way, I'm not sure whether you are using "crop" to mean what I understand it to mean—i.e. show only the part of the image that fits.

          • 2. Re: GetThumbnail is Cropping the Image
            tjmp

            Thank you for checking. I'm attaching a screenshot for your information. screenshot.jpg

            • 3. Re: GetThumbnail is Cropping the Image
              tjmp

              I am getting a thumbnail image, but the images is being cropped, which is not supposed to happen.

              • 4. Re: GetThumbnail is Cropping the Image
                keywords

                This is what I see:

                Screen Shot 2017-04-05 at 9.06.44 AM.png

                • 5. Re: GetThumbnail is Cropping the Image
                  tjmp

                  Thank you so much for your time. The blue outline of the image is missing from both container fields from your screenshot. I can see the outline in the "original" container field on my screen, but 2 sides get cropped in the "resized" field. Would you please create a new record and add a different image to see if you get the same result? Thanks again!

                  • 6. Re: GetThumbnail is Cropping the Image
                    user19752

                    I can see the same result as you (FM15 Win7).

                     

                    But it looks problem is not in the thumbnail function. When I export the field contents from original, Paint on Windows 7 shows the Untitled.wmf as 706 x 752 px, not 665 x 664 as FM function says.

                    This may be the reason what keywords (maybe using mac) saw (original also cropped).

                    • 7. Re: GetThumbnail is Cropping the Image
                      keywords

                      Could be. I am using a Mac.

                      • 8. Re: GetThumbnail is Cropping the Image
                        tjmp

                        Thanks for your reply user19752. Could it be that the properties for the original container field are not indexed properly? what can be done to resolve this? This is going to be part of a solution running on server v13 hosting clients using FM versions 13, 14 and 15.   I'm trying to find a method in this unwanted "cropping" that is happening, as a temporary solution, just so that I can built it into the cakculation in order for the thumbnail not to be compromised.

                         

                        Thanks again

                        • 9. Re: GetThumbnail is Cropping the Image
                          user19752

                          I'm not sure but the image may be corrupt, since when I tried to open it with Inkscape, it shows thumbnail as

                          (one more different size...)

                          and failed to open it. (Paint can open but it may be referring "thumbnail" raster image in wmf ?)

                          How did you make this image?

                           

                          Do you have same problem on other images?

                          • 10. Re: GetThumbnail is Cropping the Image
                            tjmp

                            The original image was created in photoshop and saved as jpeg. I used Adobe Acrobat to open and copy it to clipboard (as most of the users in our network use this appllication) and then pasted it in the container field. I'm going to copy and paste directly from paint and photoshop to see if it makes any difference. Thanks for the feedback. I'll get back with my findings.

                            • 11. Re: GetThumbnail is Cropping the Image
                              tjmp

                              >>> Do you have same problem on other images?

                               

                              Yes. We've had this problem with all the images.

                               

                              I just copied the content of a container field and pasted in Photoshop and the image was cropped, the same way as in the thumbnail function. Although the image in the "original" container field is displayed correctly, yet the width and height pixels of its content are not registering correctly. It can therefore be expected for the thumbnail to process the file incorrectly. Thanks for helping me to narrow this down this far!

                               

                              My problem, however, remains. What can I do to have FM return the correct pixels on the width and height of the "original" container field? 

                               

                              Thanks

                              • 12. Re: GetThumbnail is Cropping the Image
                                tjmp

                                The problem only occurs when the image is pasted in the container field from clipboard. The "Insert Picture" option, however, will display the correct values for the width and height pixels.

                                 

                                Is there anything that can be done to have the correct width and height pixel values be taken into account when the container content is copied into the clipboard?

                                 

                                Thanks

                                • 13. Re: GetThumbnail is Cropping the Image
                                  philmodjunk

                                  In windows, when you copy/paste using the clipboard, the file tends to be converted into a windows meta file format that has long been problematic in FileMaker--both in container fields or as a layout object. The Insert options both for inserting into a container or inserting as a layout object avoid that undesirable file format conversion.

                                  2 of 2 people found this helpful
                                  • 14. Re: GetThumbnail is Cropping the Image
                                    tjmp

                                    Thank you philmodjnk! Very useful information.  I'm going to try this on one of the Mac terminals tomorrow hoping that it might work. Most of the pic files that are currently being used in this particular solution will have to be cropped/captured out of PDF files that the clients send. Cropping, saving and inserting the pictures in the container field is not an option as it will take too much time. We need to figure out a way to copy to and paste from clipboard, or we would have to forget about resizing the images using FM GetThumbnail function, which works in itself. in the meantime I remain curious as to how the image is displayed correctly in the "original" container field, while the container attributes are not returning the correct/actual values.

                                     

                                    Thanks again for taking the time to help.

                                    1 2 Previous Next