PICT

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Sample files)
m (Sample files)
 
(4 intermediate revisions by 2 users not shown)
Line 50: Line 50:
  
 
== Software ==
 
== Software ==
* [https://www.libreoffice.org/ LibreOffice]
+
=== Vector-based software ===
 +
(software that can process PICT vectors as vectors)
 
* [[Scribus]]
 
* [[Scribus]]
 +
* [https://www.libreoffice.org/ LibreOffice]
 +
 +
=== Other software ===
 
* [[Netpbm]]
 
* [[Netpbm]]
* [[ImageMagick]]
+
* [[ImageMagick]] (for PICT v2)
 +
* [https://github.com/steventroughtonsmith/image2pict1 image2pict1] (for PICT v1)
 
* [http://www.irfanview.com/ IrfanView]
 
* [http://www.irfanview.com/ IrfanView]
* {{Deark}}
+
* {{Deark}} (for analysis, resource extraction)
 +
 
 +
== Converting ==
 +
 
 +
=== Converting from PICT ===
 +
 
 +
An image can be converted from a PICT using [[ImageMagick]]:
 +
  convert image.pict image.png
 +
This example shows a [[PNG]] image as the destination image, but ImageMagick supports many other output formats.
 +
 
 +
=== Converting to PICT ===
 +
 
 +
An image can be converted to a PICT using ImageMagick:
 +
  convert image.png image.pict
 +
This example shows a PNG image as the source image, but ImageMagick supports many other input formats.
 +
 
 +
==== Using converted images on a classic Mac system ====
 +
 
 +
Once converted, the image can then be added to a HFS disk image using [https://linux.die.net/man/1/hfsutils hfsutils]:
 +
  hmount disk.img                      # mount the HFS disk
 +
  hcopy ./image.pict :image.pic        # copy the PICT image to the disk
 +
  hattrib -t PICT -c 8BIM :image.pic  # set the type and creator codes to ensure that the image is recognised by Mac OS
 +
  humount                              # unmount the disk
  
 
== Sample files ==
 
== Sample files ==
Line 62: Line 89:
 
* http://cd.textfiles.com/fantaziasampler/CLIPART/PCT/ - Version 1
 
* http://cd.textfiles.com/fantaziasampler/CLIPART/PCT/ - Version 1
 
* http://www.ngdc.noaa.gov/mgg/geology/lazarus/ch7/pict_plots/ - Vector-only PICTs
 
* http://www.ngdc.noaa.gov/mgg/geology/lazarus/ch7/pict_plots/ - Vector-only PICTs
* https://telparia.com/fileFormatSamples/image/pict/
+
* {{DexvertSamples|image/pict}}
 
* [https://archive.org/details/parsons-photo-pics-on-cd-rom-macintosh Photo Pics PICT format for Macintosh]
 
* [https://archive.org/details/parsons-photo-pics-on-cd-rom-macintosh Photo Pics PICT format for Macintosh]
  
 
== Resources ==
 
== Resources ==
 
* {{EGFF|macpict|Macintosh PICT File Format Summary}}, from the [[Encyclopedia of Graphics File Formats]]
 
* {{EGFF|macpict|Macintosh PICT File Format Summary}}, from the [[Encyclopedia of Graphics File Formats]]
* [https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/PICT.html ExifTool: PICT Tags]
+
* [https://exiftool.org/TagNames/PICT.html ExifTool: PICT Tags]
 
* [[Wikipedia:PICT|Wikipedia article]]
 
* [[Wikipedia:PICT|Wikipedia article]]
  
 
[[Category:Macintosh]]
 
[[Category:Macintosh]]

Latest revision as of 04:23, 28 December 2023

File Format
Name PICT
Ontology
Extension(s) .pict, .pct, .pic
MIME Type(s) image/x-pict, image/pict
PRONOM fmt/341, x-fmt/80
Wikidata ID Q2044200
Released 1984

PICT, or QuickDraw/PICT, is a graphics format native to Macintosh computers. It is associated with the QuickDraw API.

Though it is a vector format, it is often used as if it were a raster format. Many files contain just a single bitmap image.

PICT format is complicated and quirky. Although plenty of documentation about it exists, there does not appear to be any single source that provides a reasonably clear and complete specification.

Contents

[edit] Format details

When PICT is used as a standalone file format, the file usually starts with an unused 512-byte header, usually with all bytes set to 0. When PICT is embedded as a resource inside some other format, this header is usually not present.

[edit] Identification

A version 1 PICT file has (hex) bytes 11 01 at offset 522 (or 10 if there is no header), and should end with ff.

A version 2 PICT file has bytes 00 11 02 ff 0c 00 at offset 522 (or 10 if there is no header), and should end with 00 ff.

[edit] Application data

Custom application data can be stored in PICT files by using the "LongComment" opcode. Each comment has an integer that identifies its "kind".

Notable comment kinds:

  • 100 is an Application Comment (see below).
  • 220 is used for ICC profile data.
  • 498 appears to be related to Photoshop, though it might also be used for other things.

The "kind" does little to identify the application, or prevent collisions. A better way is to use kind 100, which has a standard way to include a 4-byte application signature.

[edit] Related formats

[edit] Specifications

[edit] Software

[edit] Vector-based software

(software that can process PICT vectors as vectors)

[edit] Other software

[edit] Converting

[edit] Converting from PICT

An image can be converted from a PICT using ImageMagick:

  convert image.pict image.png

This example shows a PNG image as the destination image, but ImageMagick supports many other output formats.

[edit] Converting to PICT

An image can be converted to a PICT using ImageMagick:

  convert image.png image.pict

This example shows a PNG image as the source image, but ImageMagick supports many other input formats.

[edit] Using converted images on a classic Mac system

Once converted, the image can then be added to a HFS disk image using hfsutils:

  hmount disk.img                      # mount the HFS disk
  hcopy ./image.pict :image.pic        # copy the PICT image to the disk
  hattrib -t PICT -c 8BIM :image.pic   # set the type and creator codes to ensure that the image is recognised by Mac OS
  humount                              # unmount the disk

[edit] Sample files

[edit] Resources

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox