ShowPic NDA version 6.0 original v 1.0 by L.BRUCE modified Heavily by Dave Leffler original Load Picture routines by S.LEPISTO original 3200 color routine, Display routine, and MacPaint routine by Jonah Stich, Bad Luck Software GIF routines taken from public domain source code + Distribution: This product is freeware. Give it to everyone, even if they don't have a computer! This work is a labor of love for my Lord and Savior Jesus Christ! You can reach me by: America Online: DAVE.L32 GEnie: D.LEFFLER Snail Mail: Dave Leffler 13 Yorkshire Pkwy Gulfport, MS 39503 I'm currently stationed in the Phillipines, I will return to the USA sometime between August and December 1991. Until then you can reach me through: America Online: PANDA4 (my contact point) Snail Mail: Dave Leffler PSC Box 207 APO SF 96277-0006 + What it does: ShowPic is an New Desk Accessory that will allow you to view any type of IIGS Super HiRes Graphic, plus some other non-IIGS formats. You can also save that graphic in a couple of different formats, and do some simple color conversions. You may view: - Unpacked graphics (Screen) files - Eagle/Packbytes format packed graphics files - Apple Preferred format packed graphics files - PaintWorks format packed graphics files - PaintWorks Gold 640 mode packed graphics format - PrintShop GS Color Graphics - 3200 Color pictures, either normal or "3201" Packed French pictures - Graphics Interchange Format, GIF graphics - MacPaint graphics, Full or Half height You may save graphics in: (does not apply to 3200 color pictures) - Unpacked graphics (Screen) files - Apple Preferred Format packed graphics files, Full or Screen Size - Double Height Apple Preferred Format files, Full or Screen Size You may convert: (does not apply to 3200 color pictures) - 320 mode pictures into 640 mode color pictures - 320 mode pictures into 640 mode gray scale pictures - 320 mode to 640 mode - 640 mode to 320 mode - 640 mode to 320 mode with default palette - 320 mode to 640 mode with default palette You may also: - Display more that one graphic at a time like a slide show. + Installation: Simply copy the file "ShowPic6" into the "DESK.ACCS" folder found in the "SYSTEM" folder of any of your boot disks. It is an Extended file (at this time), so it may not be copied with just any copy utility, only those supporting extended files like the Finder or ProSel 16. The next time you boot that disk you'll find "ShowPic 6" under the Apple menu. You may also install it using any of the DA Installer programs. It shouldn't matter where the file is located. + Requirements: You must be running IIGS System version 5.0x (not v5.0, but 5.04 at this time). Also a little extra memory might be nice. + How to use it: After being installed, simply select "ShowPic 6" from the "Apple" menu of any standard GS/OS program. You'll then be presented with a window with some controls. The "About" button will tell you a little about this utility and can be brought up with the 'A' key. The "Help" button presents a list of the more common commands and can be selected with the '?' key. To close the NDA, select Close from the program's file menu or click in the box in the upper left hand corner of ShowPic's window. Your current settings will automatically be updated. - To Display Graphics: Pressing the 'Return' key or clicking in the Show button will bring up a list of graphics files to display. NOTE: A ROM 03 IIGS MUST Use the Key equivalents! Mouse Clicks in the buttons don't work correctly on the ROM 03. I haven't gotten the correct information how to overcome this quirk, yet! ShowPic allows you to choose more that one file at a time, you may not have seen the MultiGetFile dialog before: -- You may select individual files as normal. -- Pressing a letter key, will move the selection to the first filename that starts with that letter, or close to it. -- To select a range of files hold the 'Shift' key down. -- To deselect/select individual files, hold the 'Open-Apple' key down. -- When you've selected all the files you want to see, press return or click in the "Accept" button. If you only have one file selected, you may click in the 'Open' button. -- The easiest way to select all the files in a directory is to drag the scroll button to the bottom, hold down the "Shift" key, and click on the bottom filename. -- You may move into the next higher folder by selecting the folder and pressing return. Normally this would not be acceptable, but in ShowPic it acts just like earlier versions of the GetFile window. -- You can use the "Close", "Volumes", or 'Tab' key to move between disks and folders to find your graphics files. After you've selected your files, each will be displayed one at a time for an amount of time you can control, but more about that a little later. To advance to the next display without the wait, you may click the mouse or press any key that is not a command. You may not always see your graphic immediately. Remember that GIF and MacPaint files are FOREIGN to the IIGS and it takes a little conversion to get them to the screen. You should see the cursor change to something that tells you that ShowPic is working behind the scenes. There are several commands available to you while the graphic is displayed that let you convert or save the displayed graphic. Some of these are not available with the 3200 color pictures. We'll talk about these later. If the graphic is larger than the screen, you may use the arrow keys to scroll it. Each of the arrow keys will move the graphic in that direction. Holding down the 'Open Apple' key will cause it to scroll about 20 times faster and holding down the 'Option' key will cause it to scroll all the way to that direction. If you wish to inspect the display a little longer than it will normally stay up, you may press the 'Space' bar which will pause the display until you press another key. The key you press will be acted on immediately. If you need to exit the display of grahics, you may press the 'Esc' key. Normally when you reach the last file selected, you'll be back at the ShowPic window ready to select more files to veiw. If you'd like a continuous display or Slide Show, press the 'K' key and you'll hear two beeps to let you know you are in the "K"ontinuous Slide Show. To exit the Kontinuous display you can press the 'K' key again and you'll hear one beep to tell you it's been turn off, or you may press the 'Esc' to exit entirely. For a quick look, hold down the "L" key and the graphics will be displayed as quickly as they can be loaded, which is pretty fast from a hard disk. Actually you could use any non-command key, see the chart below. For your information, the Return key WILL NOT generate autokeypress events and must be pressed over and over again. You could also set the delay factor to '0'. - To Save Displayed Graphics: If you would like to save the displayed graphic you are viewing, you may choose from one of several formats. You might find that a graphic you wish to use in one of your programs is not in a compatible format. You can display it with ShowPic and then save it in an acceptable format. Because ShowPic is an NDA, you can do this inside the program you are using, providing there is enough memory free. To save the graphic as an unpacked Screen file, you can press the 'S' key. The graphic will then be saved on the disk in the directory you are viewing your graphic from. It will be saved under the filename "Screen.x". "x" is a letter from A to Z. The NDA will not delete a older file unless you already have 26 screen files ("Screen.A" thru "Screen.Z") already in that directory. If you do have the 26 files, it'll delete "Screen.A" and replace it. Make sure you have at least 65 blocks free on the picture disk or copy the picture to another disk, then save it. You may choose the location and filename of the saved picture, by holding down the 'Open Apple' key while pressing 'S'. This will bring up a Standard File dialog. You can move to the disk/folder you choose and type in the name you desire. When the save process is finished, you'll hear a beep. To save the graphic in the Apple Preferred Format, you have several options. APF will create a smaller file than a similar Screen file. Most IIGS applications will recognize an APF graphic. You can save the APF file as a copy of what's on the screen. This format will load correctly into ANY program that accepts APF files. You may also save it in Full size. This means that a Print Shop GS graphic will be saved as a very small file and a MacPaint graphic will be saved as a very large file. This option allows you to save the ENTIRE graphic image or to save space for small graphics. There is a drawback, some applications won't read abnormally sized APF graphics correctly. If your application is one of these, you can always go back and save it as a screen sized graphic. You can also overcome the problem of the Condensed Printing option squashing your graphics by saving them as Double Height. This essentially stretches the graphic to twice it's normal height. You may choose the Double Height Option with either the Screen Size or Full Size APF save. To save the displayed graphic as a Screen Size APF file, press the 'P' key. The picture will be saved under the filename "Packed.x". "x"is a letter from A to Z and the NDA will not delete a file unless you already have 26 APF files (from "Packed.A" to "Packed.Z") already in that directory. If you do have the 26 files, it'll delete "Packed.A" and replace it. You may choose the filename and location by holding down the 'Open Apple' key while pressing the 'P' key. To save in Double Height Screen Size format, Hold down the 'Option' key while pressing the 'P' key. Again, you could also hold down the 'Open Apple' key to select the filename and location. Depending on your 'Key Translation' setting, the NDA may not detect the 'Option' key being pressed. You may substitute 'Option P' with the 'D' (without the Option) key. Again, when the save process is completed, you'll hear the beep. To save it as a Full Size APF file, press the 'A' key. It'll also use the "Packed.x" filename. Or you could hold down the 'Open Apple' key to select a filename and location. Adding the 'Option' key will save it in Double Height. To overcome the Key Translation problem, you may use the 'F' key. - To Convert Graphics: There are some simple conversion routines that may make the displayed graphic more usable in your program. ShowPic displays the graphic the way it was saved. Some programs display the graphics the way the program is set up. For example HyperStudio displays all loaded graphics in 640 mode, regardless of how it was saved. To convert the displayed graphic to 320 mode, press the '3' key. To convert it to 640 mode, press the '6' key. To convert to a mode with it's default palette, hold down the 'Open Apple' key. Some semi-intelligent color conversions are also available. You can convert a 320 mode graphic to 640 mode colors by pressing the 'C' key. This process assumes the graphic is using the standard 320 mode default palette. It was designed to convert Print Shop GS graphics to 640 mode and may not suit your purposes. The graphic must be in 320 mode to convert it or you'll receive a non-destuctive error message. A more intelligent conversion will take a 320 mode graphic and change it to 640 mode gray scale. The shades should try to closely match the original graphic. Press the 'G' key for this command. This command also requires the picture to be in 320 mode. You can always hit the '3' key then the 'G' key. Try experimenting with these conversions. If you want to revert to the original graphic, press the 'R' key which will reload the graphic. If you would like to just revert to the original palette, hold the 'Open Apple' while pressing the 'R' key. - To Get Help: The Help window is available anytime by pressing the '?' key. This is a list of the more common commands. This is the same display available from the ShowPic main window. - Display Settings: The controls in the ShowPic window that aren't buttons are used to alter display settings. Each of these are saved when you close the ShowPic window, so they'll be there the next time you use ShowPic. The top Edit line is used to enter the delay setting. This number which may be from 0 to 99 determines the amount of time a graphic is displayed before moving on to the next one. It roughly equates to seconds on a IIGS with a TransWarp GS. If you enter any non-number characters, they'll be used as zeros. The next checkbox will override the display of error message that may occur during the display or conversion of a graphic. This let's you skip over non-graphic files easily if they were accidently selected for a slide show. It can be toggled with the 'E' key. The 'Restrict BIN and TXT File' checkbox will limit the list of files you can choose for display to those that most likely are real graphic files. See the Technical information below for the file selection rules. Checking this will prevent you from viewing a lot of Binary and Text files that aren't graphics. It needs to be unchecked to select 3200 color and GIF files that don't correspond to their normal characteristics. It can be toggled with the 'R' key. The 'Fix MacPaint Aspect' checkbox attempts to correct the aspect ratio on MacPaint files so they don't appear stretched. This should normally be checked so MacPaint files look normal. You may want to uncheck this to get a full size MacPaint file. They would print out much nicer in condensed mode, because of the greater resolution. You may also need to check this box if you don't have much free memory as a 'Fixed' MacPaint graphic requires roughly half as much memory as a 'non-Fixed' one. Toggle this one with the 'F' key. The bottom checkbox is used to select the background color used for graphics that are smaller than the screen size. This would be used with Print Shop GS graphics, MacPaint, or small APF files. Checking this makes the background Black, while leaving it unchecked would force a white background. The 'B' key is used to toggle this one. + Suggested Use: The best use for this NDA will be to convert graphics for loading into AppleWorks GS or a similar program (HyperStudio, GraphicWriter III, Medely,etc...). Think of it as a mini-SuperHiRes Convert program. It is the Only way to load a Print Shop GS graphic into AWGS with a correct palette(nearly). It can also be used to IMPORT graphics format types not normally allowed, like importing PaintWorks Clip Art file into Deluxe Paint II. From the Apple Menu select "ShowPic 6", then select the Clip Art file, then save it. Close the NDA, then just open the new file into DPII. It's that easy. + Commands and Key Equivalents ** These commands are available with all graphics: - 'K' activates/deactivates the Continuous Slide Show Feature. - 'Esc' quits the slide show. - '?' will display the window showing the available commands. ** More Commands (These won't work with 3200 color pictures): - 'Space' pauses the slide show. - Arrows scroll in their direction. - 'Open Apple' Arrow will scroll faster (about 20x). - 'Option' Arrow will scroll the end of the graphic. - 'P' saves the picture in screen size "Apple Preferred" format (packed). - 'A' saves the picture in full size Apple Preferred format. - 'Option' with the APF save commands, saves in Double Height. - 'D' saves the picture in screen size Double high "Apple Preferred" format. - 'F' saves the picture in full size Double high Apple Preferred format. - 'S' saves the current picture in "Screen" format (unpacked). - 'Open Apple' with any save command, brings up the Save dialog. - 'C' converts 320 mode to a color 640 mode graphic. - 'G' converts 320 mode to a gray scale 640 mode graphic. - '3' converts to 320 mode. - 'Open Apple 3' converts to 320 mode with the default palette. - '6' converts to 640 mode. - 'Open Apple 6' converts to 640 mode with the default palette. - 'R' Reverts to the original graphic or redisplays the current one. - 'Open Apple R' Reverts to the original palette. - Any non-command (other) key to move on to next picture. ** Equivalents for Main Window - 'Show' is selected with the 'Return' key. - 'About' is selected with the 'A' key. - 'Help' is selected with the '?' key. - 'Error Messages Disabled' is toggled with the 'E' key. - 'Restrict BIN and TXT Files' is toggled with the 'R' key. - 'Fix MacPaint Aspect' is toggled with the 'F' key. - 'Black Color Background' is toggled with the 'B' key. - Any other keys are fed into the delay setting box. + List of ShowPic Specific Errors: -- Requires a 320 Mode Picture - will be presented if you attempt to do a Color or Gray scale conversion of a picture already in 640 mode. To overcome this (if you want), first press the "3" key to place the graphic back in 320 mode. -- Not a GIF File - will be presented if you attempt to load a non-specific filetype image. The default format is GIF and any regular BIN or TXT file that fails the other format tests will be tried as a GIF graphic. The Restrict BIN and TXT Files should prevent this error from happening. If this file were a true graphic, it must have its filetype or name changed to indicate the graphic format. -- Incompatable GIF Version - will be presented if the GIF file is not either in 87a or 89a format. This is probably not a graphic. -- No GIF Color Table - will be presented if the GIF has no color table. This is probably not a graphic. -- Not Enough Memory for 3200 Color Display - will be presented if you do not have enough free memory to save the shadow screen. You may use a purge command to free up some memory. ShowPic memory requirements are listed earlier in the documentation. -- GIF File Corrupted - will be presented if ShowPic is unable to decode the GIF file. This is probably not a graphic or the file was bad. -- Too Many GIF Colors for ShowPic - will be presented if you attempt to display a GIF graphic with more than 16 colors. This version of ShowPic is limited to 16 colors maximum, the limit of the IIGS 320 mode graphics. This is a good picture and can be viewed by other utilities like GIF3200 by Bad Luck Software. -- Zero Length File - will be presented if you selected a file that has no data. This is a bad file, and probably sould be deleted since it contains nothing. -- Not a ShowPic Compatible Graphic - will be presented when ShowPic is unable to display the selected file. Somehow, this file has failed all other checks and ShowPic is unable to either determine its format or display it. -- Not Enough Memory for GIF display - will be presented if there is not enough free memory for the GIF conversion. You might try purging memory or displaying this graphic from within another program. -- No Picture in the APF File - will be displayed if the Apple Preferred Graphic contained no picture. It was probably a pattern or palette file. -- ShowPic Can't Dipsplay Folders - will be presented if you have selected a folder in the list of files, no big deal. -- Not Enough Memory for MacPaint display - will be presented if there is not enough free memory for the conversion. You might try purging memory or setting the Fix MacPaint Aspect checkbox. - If there's an error in saving the picture, the specific correct GS/OS error will be listed. Typical errors during saving include not having enough space (65 blocks needed for a Screen file) on the disk to save the file. You WILL see these errors regardless of the Ignore Errors setting. - If your boot disk or the disk you loaded ShowPic from is not online, you'll get a message asking you to insert that disk by name. ShowPic keeps most of it's information (and program) on the disk to save memory. PLEASE do as the dialog says and insert a disk. I can't tell what might happen if you don't. More than likely, the current opeation will be terminated. This does not imply that the disk must always be Online. Once the information is loaded from the disk, it will not need to reloaded unless it is removed from memory to create more space. - Any other errors should not occur, but if they do, you will get a message, which may or may not be pretty cryptic. If doesn't mean anything to you,it'll mean something to me. Please record the error number/message and pass it along to me. They will be standard toolset errors. + Thanks: To all of the people listed at the top of the document! To Dave Ely on GEnie for trying to help me fix the ROM 03 problem! To Karl Bunker, Stephen Quarrella, Jonah Stich, and to a bunch of guys on America Online: Craig Hilsenbeck, Andy Polk, and others. Most of all to the Lord for guiding me. Thanks Again! + Quirks: I'm not sure that ORCA Pascal and System v5.0x are completely stable with regards to memory. I don't think you should have any problems with this NDA, but if you do, get word to me what happened. Some machines may experience "Banding" across a 3200 color picture. I don't know what causes this, but suspect it will happen on a non- TransWarped machine with a DMA device attached (only a guess, I can't prove it). If you experience this problem, please write me and let me know your equipment setup. What program you were running at the time will also be helpful. ROM 03 machine users will be unable to get a response when clicking on the buttons. I don't know why TaskMasterDA is not returning the ControlID or ControlHandle. I've tried a number of things (Ask Andy). THE BIGGEST QUIRK: Medely, AppleWorks GS, and PaintWorks Gold (in 640 mode) will not show the correct colors with 320 mode pictures. GraphicWriter does convert the colors of most 320 mode picture to the correct color palette for 640 mode. I HAVE VERY LITTLE CONTROL over this. The only thing I can say is that the programs listed above need to read in the palettes of the 320 mode pictures and convert them to 640 mode palettes for proper color display. In the mean time, TRY the convert commands of the NDA (which attempt to mimic GraphicWriter). This is mainly because 320 mode uses 16 completely different colors, where 640 mode uses only 4 completely different colors with the other 12 colors being mixtures of the main four colors. I understand the Apple Developers Technical Staff is working on this one. Contains portions of the ORCA Run Time Libraries which are copyrighted by The Byte Works. Look for the source code to be uploaded into the A2PRO library on GEnie and in the Source Code Library on America Online in the near future. It should be pretty bug-proof, but if you have any problems, PLEASE let me know. Also if you've got any suggestions feel free to pass them to me. Most of the improvements come from the suggestion of several different users, some made as a passing comment. I can not think of anything that could be added to this NDA. The source code is out there for the hacker who wishes to try, but Bruce Mendez (L.BRUCE) and I retain the rights to release any and all new versions. + Coming Attractions: - Fixing the ROM 03 quirk - I hope to fix the 3200 color banding problem, but I have no clue, since it only appears on certain machines. It may be linked to a timing problem with non-TransWarped GS's. - GIF saving? - Displaying GIF files with more than 16 colors. - Reducing the size of a 640 x 400 GIF graphic to fit into one IIGS screen, instead of double high and double wide. - Displaying PaintWorks $C2 Animation Files? - You'll have to let me know! I'm running out of ideas. Do any of the above sound interesting? + Technical Information: Approximate Memory Requirements: - The NDA itself requires a 16K block of memory plus 32K to hide the original screen. - Whatever memory is needed to load the entire file you are viewing. Once the file is converted this file memory is released. - To display a normal SHR picture requires enough additional memory to convert the entire file (about 32K or less). A double height screen graphic (PaintWorks) would require approximately 64K of additional memory. A Print Shop GS graphic requires about 2K. An unfixed MacPaint graphic requires 100K of memory. Large GIF graphics could require similar amounts of memory. This is in addition to the memory required by the file until the conversion is complete. - To save the displayed screen as a Screen or APF file requires 32K, Double High APF requires 64K. Full Size APF requires an amount equivalent to the graphic size. These requirements are in addition to the graphic which is still in memory. - To display a 3200 color picture requires an additional 32K to hide the original shadow screen and 7K for the program. - To display a GIF graphic requires an additional 26K for the program. - Convert routines take NO extra memory. ShowPic is modular in concept. You may remove some of the resources to suit your needs. There are three Code Resources that may be removed if not needed and space is. If you have a Resource Editor that allows deleting of resources, you may remove these Code Resources. ID #1 is the 3200 color routine, ID #2 is the GIF routine, and ID #3 is the MacPaint Routine. The Cursor resource is used to show that ShowPic is working. It may be edited or removed to suit your needs. I encourage you to play with these, but don't get too wild. How ShowPic selects files and converts them is based on the following chart: Filetype/Auxtype $C1/$0000 PIC Standard Unpacked Screen Graphic $C1/$0001 QuickDraw II Picture. Not Supported $C1/$0002 PIC 3200 Color Unpacked Picture. $C1/Any Other Standard Unpacked Screen Graphic $F8/$C323 Print Shop GS Color Graphic $C0/$0000 PNT PaintWorks Packed Graphic $C0/$0001 PNT Eagle/PackBytes Packed Graphic $C0/$0002 PNT Apple Preferred Format Packed Graphic $C0/$8000 PNT PaintWorks Gold 640 mode Packed Graphic $F7/Any MacPaint Graphic (should have all headers removed) Display if BIN and TXT Files are Restricted: $04/Any TXT Text File Displayed if: $06/Any BIN Binary File Displayed if: length is 32768 bytes - Screen Graphic length is 38400 bytes - 3200 Color Picture filename ends with ".3200" - 3200 Color Picture filename ends with ".3201" - 3200 Color Picture filename ends with ".GIF" - GIF Graphic If the GIF Graphic fails, it is fed through the MacPaint routine. Display if BIN and TXT Files are NOT Restricted: $00/Any NON MacPaint Graphic (Possibly) $04/Any TXT All Text Files are Displayed: $06/Any BIN All Binary Files are Displayed: How it will be converted is: if length is 32768 bytes - Screen Graphic if length is 38400 bytes - 3200 Color Picture if filename ends with ".3200" - 3200 Color Picture if filename ends with ".3201" - 3200 Color Picture if filename ends with ".GIF" - GIF Graphic if it doesn't fall into the above - Try GIF Graphic if that fails - MacPaint Graphic + Don't forget to check out my other projects, all freely distributed: *Speed* a CDev for controlling the speed of a TransWarp GS. This first working CDev up on GEnie and the first to work will all versions of the TWGS. Shows the current speed of a TWGS in Mhz, even after changing it in the TWGS CDA. (Current Version 2.6) Launch Pad, the CDev that will Configure applications to set their own data file location, Key Translation and TWGS speed each and every time they are launched, regardless of the launching program. (current version 1.1) Desk Color, the CDev for changing the color of your desktop from the old periwinkle blue to any picture or pattern. Saves and loads many different pattern files and pictures. Built-in pattern editor with ability to load and save other patterns. (Current Version 2.5) Menu Master, the NDA that changes all your program menu bars to the colors you have selected. You can also select a font besides the standard Shaston thats used in menus on program that use the Font Manager. Your settings are permanently saved so they'll be there the next time you boot. (Current Version 1.0)