Copying pictures

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

Ronald P. Regensburg wrote: Mon Aug 16, 2021 6:45 pm Edit: The original is a simple 335x253 pixel image.
Is the original a PICT file? If so, could you open it in a text editor on the host an paste its content here?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Copying pictures

Post by emendelson »

It was in fact easy to modify my Mac OS 9 for OS X/macOS app by adding an AppleScript application to the SheepShaver system that saves the image in the clipboard to a TIFF file, and then a launch daemon running on the host copies the content of the TIFF file to the host clipboard. It takes a few seconds on the SheepShaver side, as GraphicConverter opens and saves the file, but it seems to work reliably.

Forum rules forbid a direct link to the system, but a search for Mac OS 9 for OS X/macOS will find it.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

mabam wrote: Mon Aug 16, 2021 7:25 pmIs the original a PICT file? If so, could you open it in a text editor on the host an paste its content here?
In order to make it similar to the OP situation, I made a simple AppleWorks drawing and copied that drawing. On the MacOS guest clipboard and macOS host clipboard it should then have been a pict.

I now tried the same after first converting the image to a pict file in SheepShaver. Then I copied that pict file in SheepShaver. I ran the script from Script Editor (as I did before). This resulted again in "Script error" with Script Editor freezing. Needed to force quit Script Editor.

I then saved the script as an app.
After again copying the pict in SheepShaver, I ran the script app on the host. This results in an empty dialog with only a yellow icon with exclamation mark and Edit and OK buttons.

How do you want me to show the content of the pict file? Opening the file in BBEdit shows this:

Code: Select all

QÇ˝Oˇˇ˛HH˝O
˝OòÄT˝OHH,≤i ,≤iˇˇˇˇˇˇˇˇ˝O˝OÆUSÆUSÆUSÆUSÆUSÆUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUSUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUSUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUSUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUQUSUPUSUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000URUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUSUSUPUPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UQUSUPUPUSUPUPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUPUSUPUPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000UQUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UQUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000URUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000URUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UQUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000URUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUQUSUPURUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUQUSUPUPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPURUSUPUPUSUP0000000000000000000000000000000000000000URUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UQUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUPUSUPURUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿USUSUPUSUSUPUQUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UQUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUPURUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUPURUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UQUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UQUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UQUSUPUPUSUPUSUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000USUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿URUSUPUPUSUPUPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000URUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPURUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUQUSUP0000000000000000000000000000000000000000USUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000URUSUP0000000000000000000000000000000000000000URUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUS¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSU\0000000000000000000000000000000000000000UPUSUP0000000000000000000000000000000000000000UPUSUP¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿UPUSUPUPUSUPUPÆUQÆUPÆUPÆUPÆURÆUP≠ˇ
The file opens fine in MacOS9 in Graphic Converter and in PictureViewer, and it opens fine in macOS 11 in LibreOffice.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

I wanted to compare the file’s content with the clipboard one’s to find out what needs to be parsed and how. But looking at the content you posted this is too complicated for me when not sitting behind a Mac. So this has to wait at least until next week.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

emendelson wrote: Tue Aug 17, 2021 2:51 am It was in fact easy to modify my Mac OS 9 for OS X/macOS app by adding an AppleScript application to the SheepShaver system that saves the image in the clipboard to a TIFF file, and then a launch daemon running on the host copies the content of the TIFF file to the host clipboard. It takes a few seconds on the SheepShaver side, as GraphicConverter opens and saves the file, but it seems to work reliably.

Forum rules forbid a direct link to the system, but a search for Mac OS 9 for OS X/macOS will find it.
Your system comes with the prerequisites to do this relatively easy. So I think your solution really makes sense in this context.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

Back to the OP:
@ hmzeuner

It appears that LibreOffice does not open MacDraw Pro files.
I installed MacDraw Pro 1.5 v3 in MacOS 9 in SheepShaver and did a couple of tests with a simple drawing with shapes and lines. This procedure works beautifully:

- In MacDraw Pro, save the image as EPFS while giving the file name a .ps extension
- Copy (drag) the .ps file to "Unix"
- In your SheepShaver shared folder double-click the .ps file, it will open in Preview
- Copy the image and paste in MS Word (or wherever).

As vector image information is preserved, the result is probably better than before when copying from SheepShaver.
hmzeuner
Space Cadet
Posts: 5
Joined: Sun Aug 15, 2021 12:51 pm

Re: Copying pictures

Post by hmzeuner »

Hi,
thanks very much for putting so much energy and time in my copying problem!
In following your advice I run into another problem: there is no option to save as EPSF from my copy of MacDraw Pro (Version 1.0Dv1, July 1991). When I try printing the graphic document to a file, for several minutes nothing happens except for the message "Creating Postscript file" (and the watch cursor). At the end, a message pops up saying that printing wasn't successful because of insufficient memory. The ps file which has been generated is corrupt and cannot be opened with Preview. The same happens when I try to print text from SimpleText. However, it is possible to print a Finder window into a ps file which can be opened with Preview on the host system.
I wonder whether the printing problem has to do with the fact that I cannot select a Laser Writer in the Chooser.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

It worked flawlessly here with MacDraw Pro 1.5 v3. It can save as APSF. Try that version instead. It can be downloaded from macintoshgarden.org.
hmzeuner
Space Cadet
Posts: 5
Joined: Sun Aug 15, 2021 12:51 pm

Re: Copying pictures

Post by hmzeuner »

Finally I got everything to work, thanks to your great help! It took me some time to decompress the SIT archive of MacDraw Pro v1.5 (since my old copy of Stuffit was on a removable disk which I cannot access anymore, and downloading Stuffit as an SIT archive is no viable option). My new workflow with the diagrams is completely different from my old one, but even simpler. I very much appreciate your support.
Hansmartin.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

I use "The Unarchiver" in macOS for unarchiving/decompressing alsmost any archive format. Works fine also with old .sit archives.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

mabam wrote: Tue Aug 17, 2021 10:13 am I wanted to compare the file’s content with the clipboard one’s to find out what needs to be parsed and how. But looking at the content you posted this is too complicated for me when not sitting behind a Mac. So this has to wait at least until next week.

I’ve looked further into this.

The following AppleScript works to write the clipboard’s content to a file called “clipboardConvFile” in the current user’s home folder:

Code: Select all

set clipFile to (path to home folder as Unicode text) & "clipboardConvFile"

set theOpenedFile to open for access file clipFile with write permission

-- clear file content
set eof of theOpenedFile to 0

write (the clipboard) to theOpenedFile starting at eof

close access theOpenedFile

If I copy a picture in Preview.app at the host, it is stored in the clipboard as TIFF. If I then run the above script and open the resulting file in a text editor, it begins with

Code: Select all

reco¿¿¿¿TIFFTIFF¿¿¡>MM
(where “¿” is a placeholder for information that can’t be displayed as a character).

The stuff between “reco¿¿¿¿TIFFTIFF” and “MM” can vary. But after removing anything before “MM”, the file is recognised as TIFF and can be opened as such by both, the host and SheepSaver. It wouldn’t be a problem to parse this by adding some lines to the script so it’s all done automatically.

Now I’ve tried the same with the PICT data stored in the clipboard by SheepShaver. It saves to the file just fine with the above script. But I didn’t succeed in figuring out what needs to be amended so it is recognised when copied back to SheepShaver. (’Cause once that works I expect ImageMagick to recognise it as well.)

After writing it to the file, the PICT begins with:

Code: Select all

reco¿¿¿	PICTPICT¿¿˝¸˝¸¿¿¿¿¿m¿¿¿¿¿ˇ¶¿ˇ˛¿¿¿H¿H¿¿¿¿¿¿¿m¿¿¿¿¿¿¿¿¿¿¿
Ä¿Ä¿¿ˇ¿ˇ¿ö¿¿¿ˇÑ¿¿¿¿¿¿m¿¿¿¿¿¿¿¿¿¿¿H¿¿¿H¿¿¿¿¿ 
¿¿¿¿¿¿¿¿#_’¸#_—@…

Does anyone know what to do with this? Do I need to do some decoding or conversion before parsing?
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

I’ve found https://mybyways.com/blog/applescript-t ... age-format which explains a very easy way to accomplish the image conversion:

By running

Code: Select all

return clipboard info
in AppleScript after copying an image in SheepShaver, the result is something like

Code: Select all

{{picture, 196092}, {«class 8BPS», 201448}, {GIF picture, 37142}, {«class jp2 », 21916}, {JPEG picture, 28561}, {TIFF picture, 283694}, {«class PNGf», 115937}, {«class BMP », 280374}, {«class TPIC», 191530}}

“{picture, 196092}” seems to indicate a PICT at first position next to other image formats at subsequent positions. But when pasting an image from the clipboard the format at the first position is used. Now by running

Code: Select all

set the clipboard to (the clipboard as «class PNGf»)
in AppleScript, the image’s PNG version (which already existed, only at the seventh position) is put first and the image can be pasted in, e. g. Preview.app.

After adding the above line of script to Automator.app and creating a service, a shortcut can be assigned to it in System Preferences –> Keyboard –> Shortcuts –> Services.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

Maybe I am doing something wrong, but it does not work here.

Copy an image in MacOS 9 in SheepShaver (tried different image formats)
(Bring the Finder in SheepShaver to the front as was needed before to get the copied image on the hosts clipboard)
In macOS 11 run the script

There is something on the macOS clipboard, but it cannot be pasted anywhere and Open new image from clipboard in both Preview and Graphic Converter opens an empty image.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

What’s the output of Script Editor if you run

Code: Select all

return clipboard info
after copying the image in SheepShaver?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

Code: Select all

{{picture, 20868}, {«class RECT», 8}, {«class 8BPS», 9384}, {GIF picture, 448}, {«class jp2 », 3427}, {JPEG picture, 2173}, {TIFF picture, 257632}, {«class PNGf», 1713}, {«class BMP », 255078}, {«class TPIC», 3054}, {«class RECT», 8}}
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

Your output contains «class PNGf». That means the clipboard contains a PNG version of the image at a subsequent position.

After copying in SheepShaver, If you run

Code: Select all

set the clipboard to (the clipboard as «class PNGf»)
followed by

Code: Select all

return clipboard info
– what is the output then?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

Code: Select all

{{«class PNGf», 1713}, {«class 8BPS», 9384}, {GIF picture, 448}, {«class jp2 », 3427}, {JPEG picture, 2115}, {TIFF picture, 257686}, {«class BMP », 255078}, {«class TPIC», 3054}}
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

Now «class PNGf» is at first position. If pasting doesn’t work at this point that might mean something changed with Big Sur. If I proceed this way on Catalina pasting works fine, also when choosing “Open new image from clipboard” in Preview. (But directly pasting as PICT after copying from SheepShaver doesn’t work in Catalina either.)

Just to be sure: Was the original image in SheepShaver just pixels or was it a PICT containing also vectors?

Maybe others on Catalina or Big Sur could test this to see whether it is indeed related to the host OS version?


EDIT:
Something I just noticed: The files sizes shown behind the classes and image formats of your output seem a bit odd to me. The difference between 257686 for a TIF and 2115 for a JPG is very large. Also, PNG with 1713 being actually smaller than the JPG seems rather seldom to me.

The same discrepancy can be observed when looking at your output from before putting «class PNGf» first. So I actually wonder whether what SheepShaver saved to the clipboard was already a white or “empty” image.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

I copied different images in SheepShaver, pict, jpg, tiff

The copied images were on the SheepShaver clipboard and could be pasted inside SheepShaver.

Copying images in the host macOS and then pasting in SheepShaver works fine.

I am running Big Sur on a M1 iMac.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

Then I think this would be the next step to verify:
mabam wrote: Wed Aug 25, 2021 8:06 pm Maybe others on Catalina or Big Sur could test this to see whether it is indeed related to the host OS version?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Copying pictures

Post by emendelson »

mabam wrote: Wed Aug 25, 2021 8:38 pm Then I think this would be the next step to verify:
mabam wrote: Wed Aug 25, 2021 8:06 pm Maybe others on Catalina or Big Sur could test this to see whether it is indeed related to the host OS version?
This is a brilliant solution. Under Big Sur, this script works perfectly to covert an image in the SheepShaver clipboard so that it can be saved from the macOS clipboard:

Code: Select all

try
	the clipboard as TIFF picture
	set the clipboard to (the clipboard as «class PNGf»)
end try
The try block makes the second line run only if the clipboard has an image in it; otherwise it exits and does nothing.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Copying pictures

Post by mabam »

Good to hear it works for you under Big Sur.

You don’t actually need the line “the clipboard as TIFF picture”. If the clipboard does not contain an image, setting the clipboard to the PNG will fail and the script snippet does nothing as it is in a try block. So it will have the same effect as with the TIFF line.

Instead of “«class PNGf»” you could also use, e. g. “TIFF picture”, “JPEG picture”, or “GIF picture”. But I’ve chosen PNG because it is relatively small while preserving quality as it is lossless.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Copying pictures

Post by emendelson »

I've now added this to my Mac OS 9 app. I added an item to the Apple Menu called "Clipboard Image to Host." When you run this script it writes a file to the host, and a launch daemon (which works like a Folder Action Script) runs the AppleScript line that you wrote, and makes the image available from the host clipboard. And you're right - I don't need the "try the clipboard as TIFF image" line. Thank you for this!
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

Now, why doesn't it work here? Could it be because my Mac runs on Apple Silicon?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Copying pictures

Post by Ronald P. Regensburg »

I tried after setting SheepShaver to run with Rosetta. Result is the same.

An interesting fact that I did not mention before:
The blank (white) image that is opened in Preview or Graphic Converter using 'open new image from clipboard' has the same size in pixels as the image that was copied in SheepShaver.
Post Reply