If have a legacy Filemaker 9 application. I wrote some scripts in AppleScript to extract all the tables. This works fine.
Now some tables also have images. The result I get in Xojo when calling the script is a Mac PICT memory block. Is there a possibility to convert that into a Picture?
Here is a sample:
I assume that either «data …» or even «data PICT…» is not part of the picture data, but Filemaker stuff.
You can convert pict to other formats.
E.g. By trying MBS Plugin.
We have a class MacPictMBS and a NS class for pict.
This is a one time transfer from this legacy database. I do not want to buy a plugin for this.
maybe try Picture.Open than?
PS: I didn’t expect you to buy the plugin set for just this. I expect you had it already for other reasons.
Picture.Open works with PICT files. My problem is that I don’t know what part of the above memory block example is really the PICT.
Perform your OneTime Conversion in Debug Mode
(PS: The MBS Suite is worth every cent)
Guys, if you can’t answer my question, this is ok. But I have stated: no plugin.
Your best bet would be to find an old Filemaker 9 to make the conversion.
Ask the question to the AppleScript List (from Apple). I do not boot on the main boot disk, so I cannot gives you the URL details.
I think it is possible to make the export, but my memory fails nowadays.
Guys: the title of this thread is Mac PICT to Picture.
I answered a bit fast.
Do you have PICT files on disks as the result of Table contents extracts ?
If so, just open one and assign it to a Canvas, then save the Canvas as png for example. Then automatize the process (drag and drop).
Last time I checked, Preview was able to open PICT files, but I forgot: when and if I was able to Export the file to something else (png, jog,
As I wrote, I have this in a memory block:
What I have found out is that a 512-Byte header needs to be added (as Filemaker chops that part when importing image files).
Can you send me one memory block ?
So, FileMaker 9 cannot generate a picture file from a record ?
Don’t get angry because people try to help, please.
You can write the PICT to file with header and use any tool you want to convert it.
FileMaker wouldn’t be a help as it can import and store the PICT.
I’ve been trying to make sense of the format, thinking the header must start off with some id, but all I can find about the header is it “contains information that the Macintosh uses to keep track of the file”. It’s possibly unused by now and can just be all 0’s.
And to identify the data in your memoryblock is this info http://fileformats.archiveteam.org/wiki/PICT
A version 1 PICT file has (hex) bytes 11 01 at offset 522, and ends with ff.
A version 2 PICT file has bytes 00 11 02 ff 0c 00 at offset 522, and ends with 00 ff
It is possible in AppleScript to coerce a “resource” (so « data PICT
) into what you want and save it to disk. It’s just that I do not recall the details.
This does not gives you the answer, but help (a bit) to understand what I mean:
[quote=280469:@Eli Ott]«data PICT037C0000000000100010001102FF0C00FFFE000000480000004800000001000100000000200
I assume that either «data …» or even «data PICT…» is not part of the picture data, but Filemaker stuff.[/quote]
Indeed Pict documents I have here start with a series of chr(0).
But as it is, Pict is probably using a data fork, as it was common at the time.
I think I found your answer:
Get an eye on Yvan script here .