December 1, 200619 yr From a script, how can I determine what type of graphic file is held in a container field? (a container field defined to hold a graphic and not a file reference to the graphic) From the help file: FileMaker Pro supports the following picture ... formats: EPS, FPX, GIF, JPG etc., etc. (17 in all). . You can add a graphic to a container field by inserting it, using drag and drop, or by pasting the graphic from the Clipboard. If the user drags a graphics file from another application and drops it in the container field, does FileMaker keep it (internally) in its original format? -- or does it convert to some internal representation and, if so, what is it? If the first case is true, is there a script operation that can read the file type currently in the container? And a related question: if the user drops a file into the container and drags it out to another application, what file format is dragged out? I've found nothing in FileMaker's online help that seems to address these issues. Any help will be appreciated.
December 1, 200619 yr Could use a custom function something akin to the following: GetFileExtension ( ContainerField ) Let( x = GetAsText( ContainerField ) Case( PatternCount( x ; ".JPG" ) ; ".JPG" ; PatternCount( x ; ".EPS" ) ; ".EPS" ; PatternCount( x ; ".FPX" ) ; ".FPX" ; PatternCount( x ; ".GIF" ) ; ".GIF" ; ... ... ... )//End Case )//End Let Then during your script just use the GetFileExtension( containerfield ) function, passing the container field where it says "containerfield" and it should return the extension for you Out of curiosity, what are the 17 formats?
December 1, 200619 yr RE: The drag and drop, even if FM does convert it to some sort of "internal representation" it is ... unconverted when you export it in any shape or form (including dragging to another app).
December 1, 200619 yr Author Thanks for the recommendations. The documention actually lists 18 formats: Encapsulated PostScript (.eps) FlashPix (.fpx) GIF (.gif) JPEG (.jpg) JPEG2000 (.jp2) MacOS MacPaint (.mac) MacOS PDF (.pdf) MacOS Photoshop (.psd) PICS (.pcs) MacOS PICT (.pct) PNG (.png) QuickTime Image (.qt) SGI (.sgi) Targa (.tga) TIFF (.tif) Windows Bitmap (.bmp) Windows Metafile (.wmf) Enhanced Metafile (.emf) Four are noted as "MacOS". Does anyone know if they will be accepted by FileMaker running under XP? Just curious.
Create an account or sign in to comment