| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
📦 Install the Package from nuget
Install-Package PictSharp.ImageSharpAdaptorThe following will convert an ImageSharp image into PICT
using PictSharp.ImageSharpAdaptor;
...
// Register the PICT Encoder with ImageSharp
var module = new PictConfigurationModule();
module.Configure(SixLabors.ImageSharp.Configuration.Default);
// Load an ImageSharpImage
using (var image = SixLabors.ImageSharp.Image.Load<Rgba32>("Lenna32.png"))
{
// Save to PICT
image.SaveAsPict("Lenna32.pict");
}You can control the bit depth of the images by setting the encoder.
var encoder = new PictEncoder();
encoder.PictBpp = PictBpp.Bit8;
image.SaveAsPict("Lenna8bpp.pict", encoder);For .NET Framework 4.6.1+ there is support for System.Drawing.Bitmap under Windows.
📦Grab the package:
Install-Package PictSharp.Drawingusing PictSharp.Drawing;
...
var image = new System.Drawing.Bitmap("source.png"); ;
using (var output = new FileStream("output.pict", FileMode.CreateNew))
image.SaveAsPict(output);PICT is a legacy meta-file format created by Apple, which contains (basically) serialised QuickDraw commands which can be "replayed" to produce an image. It can contain both vector and bitmap components. It is somewhat similar in concept to Windows Metafile (WMF) format. The format itself is not clearly documented, with only limited documentation available from Apple, and few implementations available.
In 2021 the most common place you'll find PICT files is MacOS Clipboard data, and RTF documents (\macpict).
The format was extended with the release of QuickTime 2.0 to support QuickTime compressors, so can contain not just JPEG or PNG images, but also Video Codecs, like Cinepak, Quicktime Animation/Graphics, "Apple Video" (RDZA), etc.
Know of some more? Please let me know!
MIT License
As always, supplied as-is without any warranties. If you find an issue, please raise it via Github. PRs welcomed.
| Back | FazBrowse Home | New Git URL |