FMP handling of Windows Extended Metafile

5 messages Options
Embed this post
Permalink
Doug McLean

FMP handling of Windows Extended Metafile

Reply Threaded More More options
Print post
Permalink
This is a question for FMI. I hope someone is reading our list!

When a Window metafile (.wmf) is inserted into a container field
using "Insert picture...", a 'META' stream is created. When an
Extended metafile is inserted, the container also ends up with a
'META' stream.

Does this mean that "Insert picture..." converts the EMF to WMF and
stores the WMF? And that FMP does not know how to display EMF
directly? Or is there a way to coax FMP into displaying an EMF?

The issue is that I am trying to store an EMF image generated by  a
plug-in, since MS says that Windows metafiles are obsolete.

When I store a WMF in a "META" stream with an empty JPEG preview, FMP
displays the WMF image directly. When I store the EMF bits in a
'META' stream with an empty JPEG preview, FMP displays nothing.
----------------------------

Second question:
Both WMF and EMF have an absolute size embedded in their
descriptions. I would like FMP to honor this size on screen and
paper. So then how do I set the SIZE? Is there a standard convention
to convert absolute size to SIZE dimensions?


Thanks for you help.

Doug
whuslik

Re: FMP handling of Windows Extended Metafile

Reply Threaded More More options
Print post
Permalink
Doug,

As a general rule, FM always tries to create a JPEG from the inserted  
graphic, unless it is already provided. What FM displays is primarily  
the JPEG and maybe some other formats as "second choice".

I did not play with META and I try to avoid them whenever I can,  
since they usually tend to blow up the file size unnecessarily. All  
you need to see is in the JPEG.

You may examine the "real" content of a container field by copying it  
to the clipboard and analyze the clipboard format (on a Mac with  
Clipboard Viewer that comes as source with Xcode).



The graphic dimensions have nothing to do with SIZE. These are part  
of the stream and may contain other relevant information, like the  
screen (print) resolution, which directly influences the display  
dimension.
SIZE just indicates the number of bytes the stream occupies.


Winfried
www.fmdiff.com the developer tool to compare FileMaker files



On 28.05.2008, at 18:53, Doug McLean wrote:

> This is a question for FMI. I hope someone is reading our list!
>
> When a Window metafile (.wmf) is inserted into a container field
> using "Insert picture...", a 'META' stream is created. When an
> Extended metafile is inserted, the container also ends up with a
> 'META' stream.
>
> Does this mean that "Insert picture..." converts the EMF to WMF and
> stores the WMF? And that FMP does not know how to display EMF
> directly? Or is there a way to coax FMP into displaying an EMF?
>
> The issue is that I am trying to store an EMF image generated by a
> plug-in, since MS says that Windows metafiles are obsolete.
>
> When I store a WMF in a "META" stream with an empty JPEG preview, FMP
> displays the WMF image directly. When I store the EMF bits in a
> 'META' stream with an empty JPEG preview, FMP displays nothing.
> ----------------------------
>
> Second question:
> Both WMF and EMF have an absolute size embedded in their
> descriptions. I would like FMP to honor this size on screen and
> paper. So then how do I set the SIZE? Is there a standard convention
> to convert absolute size to SIZE dimensions?
>
> Thanks for you help.
>
> Doug
Jake Traynham

Re: FMP handling of Windows Extended Metafile

Reply Threaded More More options
Print post
Permalink
Winfried:

   Umm, no.  The "SIZE" container stream holds the dimensions of the
image in the field.  It's two short ints for the width and the height.
This information is in the API headers.  And Doug isn't talking about
only inserting these images into a container field from the FileMaker
Pro interface, he's talking about inserting these images from a plug-in.

Doug:

   I've talked with Clay before about the "OLE" objects (for like
inserting word documents or whatever in container fields), and he was
basically saying it's a black box.  I would imagine that the handling of
windows meta files is similar if not the same thing.  When you do the
"insert picture" in FMP, they probably ask the system to load it and
give them a jpeg preview (or at least a raw image they can make into a
jpeg preview) and then ask the system to give them the underlying data
to store in the META stream.  I don't know the specifics about these WMF
and EMF files, though, and I'm just speculating on what they are doing,
but don't be surprised if you get back a "we don't really know" answer
from FMI.  When I was asking Clay about the OLE objects, I was trying to
figure out the location of an inserted word document, and I got back a
"we don't really know" type answer.

   However, I'd love to hear from Clay or David on this.  They've gotta
still be out there lurking. :)

Jake

Winfried Huslik wrote:

>
>
> Doug,
>
> As a general rule, FM always tries to create a JPEG from the inserted
> graphic, unless it is already provided. What FM displays is primarily
> the JPEG and maybe some other formats as "second choice".
>
> I did not play with META and I try to avoid them whenever I can,
> since they usually tend to blow up the file size unnecessarily. All
> you need to see is in the JPEG.
>
> You may examine the "real" content of a container field by copying it
> to the clipboard and analyze the clipboard format (on a Mac with
> Clipboard Viewer that comes as source with Xcode).
>
> The graphic dimensions have nothing to do with SIZE. These are part
> of the stream and may contain other relevant information, like the
> screen (print) resolution, which directly influences the display
> dimension.
> SIZE just indicates the number of bytes the stream occupies.
>
> Winfried
> www.fmdiff.com the developer tool to compare FileMaker files
>
> On 28.05.2008, at 18:53, Doug McLean wrote:
>
>  > This is a question for FMI. I hope someone is reading our list!
>  >
>  > When a Window metafile (.wmf) is inserted into a container field
>  > using "Insert picture...", a 'META' stream is created. When an
>  > Extended metafile is inserted, the container also ends up with a
>  > 'META' stream.
>  >
>  > Does this mean that "Insert picture..." converts the EMF to WMF and
>  > stores the WMF? And that FMP does not know how to display EMF
>  > directly? Or is there a way to coax FMP into displaying an EMF?
>  >
>  > The issue is that I am trying to store an EMF image generated by a
>  > plug-in, since MS says that Windows metafiles are obsolete.
>  >
>  > When I store a WMF in a "META" stream with an empty JPEG preview, FMP
>  > displays the WMF image directly. When I store the EMF bits in a
>  > 'META' stream with an empty JPEG preview, FMP displays nothing.
>  > ----------------------------
>  >
>  > Second question:
>  > Both WMF and EMF have an absolute size embedded in their
>  > descriptions. I would like FMP to honor this size on screen and
>  > paper. So then how do I set the SIZE? Is there a standard convention
>  > to convert absolute size to SIZE dimensions?
>  >
>  > Thanks for you help.
>  >
>  > Doug
>
>

--
Jake Traynham
Owner, CNS Plug-ins
http://www.cnsplug-ins.com/
Doug McLean

Re: FMP handling of Windows Extended Metafile

Reply Threaded More More options
Print post
Permalink
Winfried and Jake,

Thanks to both of you for jumping in. FMP seems designed to store and
export various image types, but not to display them
(displaying/printing the jpeg preview instead). My application
however generates barcodes made of tiny b/w squares, and when the
jpeg preview is used for printing, there are blurry artifacts at the
edges that degrade scanning of the barcode. Because my customers use
FMP for both generating and printing barcodes, I need FMP to use the
actual image, not the preview.

After many hours of experimentation I found that FMP will sometimes
display the underlying image type directly when you trick it by
providing an empty jpeg. This works only for certain image types and
varies between Mac and Windows. I don't know whether these tricks
will keep working in the future.

A very helpful improvement to FMP would be container field setting
that means "Print/Display the actual image (vs. the preview)".

My desire to use EMF is that the barcode "squares" should map exactly
to an integral number of printer dots for the best scanning results.
That means I need to control the actual physical size of the barcode
image. EMF is the only Windows format that claims to provide this
control. But so far I can't get it to work with FMP (from the
plug-in).

Anyway, at this point I have spent far too much time doing fruitless
experiments, and need to get this product out the door. So I will go
back to clumsy old Windows bitmaps. If I hear back from FMI on these
questions, I'll release "V. 2 with EMF Support!"





Jonathan Knapp

RE: FMP handling of Windows Extended Metafile

Reply Threaded More More options
Print post
Permalink
Doug,

 

Look at IrfanView.  I use it to batch convert images directly from FM and it
works great and is fast.  There is a command line batch mode that is easy to
use and you can drive it from send message script step with no plugins.

 

I negotiated a developer license and include it with my application.

 

Jonathan

 

Jonathan Knapp

cid:[hidden email]

Simply Reliable Software

www.simplyreliable.com

mailto:[hidden email]

Ph/ 617.731.0113 x 101

Fax/ 917.591.4231

 

From: [hidden email]
[mailto:[hidden email]] On Behalf Of Doug McLean
Sent: Thursday, May 29, 2008 11:32 AM
To: [hidden email]
Subject: Re: [fmplug-prog-list] FMP handling of Windows Extended Metafile

 

Winfried and Jake,

Thanks to both of you for jumping in. FMP seems designed to store and
export various image types, but not to display them
(displaying/printing the jpeg preview instead). My application
however generates barcodes made of tiny b/w squares, and when the
jpeg preview is used for printing, there are blurry artifacts at the
edges that degrade scanning of the barcode. Because my customers use
FMP for both generating and printing barcodes, I need FMP to use the
actual image, not the preview.

After many hours of experimentation I found that FMP will sometimes
display the underlying image type directly when you trick it by
providing an empty jpeg. This works only for certain image types and
varies between Mac and Windows. I don't know whether these tricks
will keep working in the future.

A very helpful improvement to FMP would be container field setting
that means "Print/Display the actual image (vs. the preview)".

My desire to use EMF is that the barcode "squares" should map exactly
to an integral number of printer dots for the best scanning results.
That means I need to control the actual physical size of the barcode
image. EMF is the only Windows format that claims to provide this
control. But so far I can't get it to work with FMP (from the
plug-in).

Anyway, at this point I have spent far too much time doing fruitless
experiments, and need to get this product out the door. So I will go
back to clumsy old Windows bitmaps. If I hear back from FMI on these
questions, I'll release "V. 2 with EMF Support!"

 

__________ Information from ESET Smart Security, version of virus signature
database 3144 (20080529) __________

The message was checked by ESET Smart Security.

http://www.eset.com


 

image001.jpg (4K) Download Attachment