Skip to content

Commit

Permalink
Optimised images, wrote a basic readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
wiesmann committed Jan 24, 2024
1 parent 6804519 commit 1179178
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 0 deletions.
Binary file modified Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Icon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Icon256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Icon32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Icon64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@
# QuickDraw Viewer

![](Icon128.png)

I wanted to teach myself Swift programming, and needed something a bit more involved than just _Hello World_, so I decided the write a program that would decode QuickDraw image files and display them. This was basically a rewrite of the [Java Quickdraw](https://github.com/wiesmann/JavaQuickDraw) code I wrote, many years back.

This program is far from finished, but I decided to release it for the 40th anniversary of the original Macintosh computer: QuickDraw was the graphical language of the original Macintosh, and the format used to store and exchange images on the computer. Support for these files has been slowly decaying with newer versions of Mac OS X, and on my M1 PowerBook, Preview can only open a small subset of the files I have.

## Structure

This program has basically three parts:

* A library that parses QuickDraw files, which only depends on the `Foundation` framework.
* A Library that renders into a CoreGraphics context, which depends on CoreGraphics, CoreText and CoreImage.
* A minimalistic Swift-UI application that shows the pictures.

This means the code could be used in other applications that want to handle QuickDraw files.

## Features

The library basically parses QuickDraw version 1 and version 2 files, and supports the following features.

* Lines
* Basic Shapes (Rectangles, Ovals, Round-Rectangles and Arcs)
* Regions
* Text
* Patterns (black & white(
* Colours
* Palette images
* Direct (RGB) images
* QuickTime embedded images with the following codecs:
* JPEG, TIFF, PNG, BMP
* RAW

Some basic comment parsing is used to improve images, in particular:

* Polygon annotations to connect the lines and close polygons
* Fractional pen width

## Unsupported features

Currently, the following QuickDraw features don't work:

* All modes except `copy`
* Text rotation
* Exotic QuickTime codes, in particular:
* Photo-CD
* Apple Video (`RPZA`)

## Application

The application is currently very simple, you can view pictures, copy-paste them to Preview. There is some primitive drag-drop that works when the target is Notes or Pages, but not when the target expects a file, like the Finder or Mail.

0 comments on commit 1179178

Please sign in to comment.