Jump to content

Question on Containers with Graphics


This topic is 6349 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6349 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.