ImageBrowser README http://homepage.mac.com/levanj/Cocoa jerry.levan@eku.edu ImageBrowser 0.96 (Jan 23, 2008) I have added support for password protected zip and cbz files. Be aware that support for password protected files ( both zip and rar) are fairly fragile. I try to scan the output of the unzip and unrar commands looking for key works ( like password/incorrect...). This release also seperates pages by 10 pixels when in two page mode. ********************************************************************************* ImageBrowser 0.95 (Dec 25, 2007) Whoo Boy! It has been a while since the last update. This is a major revision. ImageBrowser is now available as a Universal Binary at the 10.4 level and there is also a Leopard (Intel) binary available. The major enhancement has been added support for the "Comic Book" format. files ending in a .cbz or .cbr ( also .rar and .zip) files can be dragged onto the application window or program icon and the "graphic novel" contained therein will be displayed. The cbr (et all) file will be expanded into a 'hidden' directory .cbrcbz in the users home directory. The directory and constants will be removed whenever the next cbr/cbz file is selected and also whenever the program ends. I have included some support for password protected cbr files ( no support for password protected cbz files yet...). The "View" menu now has a "Show Two Pages" item. Selecting this menu item will enable/disable the display of two images side by side at the same time. (This feature will not work if "Free Rotation is enabled). By default if "Show Two Pages" is selected, each page forward simply moves the right page to the left page and brings in the next page. If "Set Book Mode" is selected then each page forward/backward actually advances two pages, much like turning a page in a book. This version also supports a "Convert Book To PDF..." menu item in the "File" folder. This item will save the current file set as a multipage PDF file with one page per image. Unfortunately the default construction of the PDF document from the image files leads to enormus PDFs. eg a 14 page 'comic' with 8 MB total size would generate a 38MB PDF! The way to get around this problem is to apply a Quartz filter to the result. The filter provided by ImageBrowser yielded a file size of 1.8MB in the above example. The default location for Quartz user defined filters is in ~/Library/Filters. When ImageBrowser starts it looks in the users Library/Filter directory and if the Filters directory does not exist or the file "ImageBrowser.qfilter" is not in the Filters directory, ImageBrowser will create the Filters directory, if needed, and place an internal copy of the filter in the Filters directory. The supplied filter will lighten PDFs and do a jpg compression for all of the jpg images in the PDF. Leopard (10.5+) makes it easy to apply the filter, the Universal SDK 10.4 tookkit (aka Tiger) does not. The Universal build has to first write the constructed PDF ( which is more difficult to construct in Tiger) to a temporary file and then apply the filter using the program 'quartzfilter' to do the compression and write the file to the user specified location. Finally the temporary file is deleted. Leopard can do this much more easily :) A nifty thing about the filter is that it is visable to the "ColorSync Utility" located in the Utilities folder of the Applications folder. Start the utility and click on the Filters icon in the toolbox. After you run ImageBrowser the first time, you should see a Filter named "ImageBrowser". If you click on the disclosure symbol to the left of the ImageBrowser the to component of the filter will be displayed, "Intermediate Transform" which will lighten the PDF ( I download to an Grayscale Iliad and the PDF rendering looks a bit better to my eye) and "Image Compression". Clicking the disclosure symbol will show how much compression is performed on the images, you can modify either of the two filters ( or add one !) in the program and ImageBrowser will use the modified filter. ImageBrowser will restore the original filter if you accidently delete it. Finally the "Show Grayscale" item in the View menu is infinity faster than the older versions ( but shows an ugly black border if "Free Rotation" is on). ********************************************************************************* ImageBrowser 0.94 (Sept 23, 2004) With the help of Eric Johnston's exiftags-0.99.1 and Andreas Mayers' AMShellWrapper, ImageBrowser is able to show exif information that many digital cameras embed into the jpegs that are stored in the camera. When a jpeg format file is in the main viewer select "Show Exif Info" from the "File" menu and the exif info will be displayed (if present) in a new window. ********************************************************************************* ImageBrowser 0.93 (July 21, 2004) The user can view the current image as a gray scale image by selecting "Show Gray Scale" from the View menu. This capability only works for the currently viewed image. If the image is rotated, scaled (or another image is selected) the image reverts to the original image (or is changed to the selected image). The conversion is taken directly from an Apple Sample Code example, it is rather slow so be patient. The "Open Recent" menu in the File menu has been activated. Dragging an image or directory onto the ImageBrowser Icon will generate an entry into this menu. An entry is also generated by using the open dialog in the file menu. Selecting a member from the Open Recent menu will naturally open the specified directory. Note that the Open Recent menu "remembers" its contents from invocation to invocation of ImageBrowser. ********************************************************************************* ImageBrowser 0.92 (July 9, 2004) The user can now rotate an image by any amount [0..360]. This feature can be enabled by choosing "Enable Free Rotation" from the "View" menu. When this menu item is checked the rotation slider can be used to select the amount of rotation desired. When free rotation is enabled, the up and down arrow keys will rotate the image by ten degrees. If free rotation is not enabled rotations will be limited to multiples of ninety degrees. Note that in order to prevent clipping during the rotation I embedded the image in a larger square (the side of the larger square is the length of the diagonal of the zoomed image). When switching between the two modes, when the next operation is done there will be a twitch on the screen when the image is removed/embedded from the larger frame. I suspect that the fixed multiple of ninety degrees rotations are probably more accurate. ********************************************************************************* ImageBrowser 0.9 (July 5,2004) ImageBrowser can be started by dragging a file, not necessarily an image file, or a directory onto the ImageBrowser Icon. If a file is dragged onto the icon the parent directory will be opened and processed. If a directory is dragged then the directory will be opened and processed. The rotation code has been rewritten to be at least twice as fast in some cases. Vertical and horizontal reflection capability has been added, this capability only works on the image shown in the window. ie *any* change of the window by zooming or rotation will cause the reflected image to be removed from the display. The current image can be "reflected" by selecting "Flip Image Horizontally" or "Flip Image Vertically" from the View menu. The 'v' key will also flip the image vertically, the 'h' key will flip the image horizontally. Note that repeatedly hammering on the 'v' or 'h' key will eventually degrade the image dues to floating point rounding errors. Closing the main window will now warn that the close will terminate the application and give the user a chance to cancel the close. ImageBrowser now displays the images centered in the main display window. ********************************************************************************* ImageBrowser 0.84 (July 1, 2004) A ToolTip containing the image filename will be displayed when hovering the mouse over a thumbnail image. ToolTips have been added to the controls at the bottom of the main window to give usage information. The selected thumb is now set into a blue frame. This makes it easy to tell which thumb represents the image in the main window. ********************************************************************************* ImageBrowser 0.83 (June 29, 2004) It is now possible to control image zooming via the keyboard. This might be useful during full screen mode. A 'Z' will enlarge the image by 10 percent a 'z' will decrease the image size by 10 percent. A dialog has been added to allow the user to set the duration for each slide during the slide show. The dialog is accessed by the "Set Slide Show Timer..." menu item in the View menu. ********************************************************************************* ImageBrowser 0.82 (June 28,2004) has a number of enhancements over the previous versions. This version only builds the thumbnails "on demand" (see below). By default the image filenames are stored in the thumb drawer. This means that there is no long wait for the program to start. ImageBrowser now has a "View Options" menu: Build Thumbs The Build Thumbs command will construct thumbnail images for each of the image files the user has selected. This (possibly lengthy) operation can be halted by clicking on the Quit button in the progress dialog. If the thumbnail creation process is halted prematurely some of the thumbnail slots will still contain the filename of the image. The image will still be scaled and shown in the big scrolled viewed if the filename is clicked. Toggle Thumbs This command will toggle open/closed the thumbnail drawer. There needs to be a bit space on the left or right side of the main window in order to see the drawer. Previous Image This command will show the previous image ( in thumbnail drawer sort order). If the first image is being shown the the Previous Image command will wrap around to the last image in the thumb drawer. This command can be used while in full screen mode. Next Image Next Image will show the next image in the drawer. It will wrap around to the beginning if the main window is showing the last image in the drawer. This command can be used while in full screen mode. Start Slide Show This command will start at the current image and display each image in turn for five seconds until interupted by another . Note that the "Start Slide Show" memu item will change its title to "Stop Slide Show" during a slide show. Stopping the slide show will change the menu item name back to "Start Slide Show". Slide shows can be started and stopped while in full screen mode. Toggle Full Screen Mode This is the most exciting feature of this version. Selecting this menu item will cause the image currently showing in the main window to be scaled and displayed in full screen mode. If the image is too large it will be clipped. Note that the Next, Previous and Slide Show commands still work in full screen mode. To exit from full screen mode you *must* use again. Added: The key will toggle full screen mode. Full Screen Scales Images By default when full screen mode is entered images are not scaled to fit the window. This means that if the image is too big it will be clipped by the full screen.It might be possible to construct an image that cannot fit within the screen. Selecting this menu item ( so a check is present) will change the full screen mode so that an image will *always* be scaled so it will entirely fit on the screen ( independent of your choosen scale). In addition to the above - options, the escape key will always toggle full screen mode and the right and left arrow keys will always advance or backup one image. The up and down arrow keys will now rotate the image. There is now an unlabeled slider on the bottom of the main window. This slider controls how the image is rotated on the screen. Each tick mark represents 90 degrees. The first tick mark is 0 degrees. Note the slider will only "stick" on the tickmarks. ************************************************************************ ImageBrowser 0.7 (June 21, 2004) Is a simple Cocoa program that allows the user to view all of the images in a single directory that the user chooses. The supported image types are the types supported by NSImage. Using the program. When the program starts the user is presented with a window containing a scrolled view, some buttons, and a slider control. The slider control controls the zoom factor applied to each image that is displayed in the scrolled view. (0 < zoom <= 5.0 ). To start viewing images the user must first select a directory by choosing "Open..." from the File menu ( or ). The program with then construct thumbnails for each image in the directory. While the thumbnails are being constructed, a progress dialog will be shown that gives the number of files left to process. After the thumbnails have been constructed the first image will be scaled by the zoom factor and displayed in the main window. Note the window title will change to display information about the image. The thumb button at the bottom of the screen will toggle the thumb drawer open or shut (-T). After the thumbs are constructed the images can be viewed in a variety of ways. 1) Clicking on a thumb in the drawer window will cause it to be shown (and scaled by the zoom factor) in the main window. 2) Clicking the "Next" button () will scale and display the next image in the thumb list. 3) Clicking the "Start Slide Show" button ( -S) will continously scale and display each of the images for five seconds. Once the slide show has started, the button will change to "Stop Slide Show", clicking (or -S) will then stop the slide show. To Do List: 1) Allow Thumbnail construction to be halted. 2) Allow images to be selected by file and/or directory. 3) Develop a full screen mode for the slide show. 4) Develop a "no thumbnail" mode. Thanks To: John Pannell for showing me how to properly scale images, and how to build "Action Image Cells" ( Sorta like buttons...) and Gus Mueller for helping me with a memory management problem. Enjoy, Jerry LeVan (jerry.levan@eku.edu)