Skip to content

FLIF image viewer and QuickLook plugin for macOS

License

Unknown, BSD-3-Clause licenses found

Licenses found

Unknown
License.html
BSD-3-Clause
License.txt
Notifications You must be signed in to change notification settings

sveinbjornt/Phew

Repository files navigation

Phew - FLIF Image Viewer for macOS

Phew Application Icon

Phew is an open-source FLIF image viewer and QuickLook plugin for macOS.

The Free Lossless Image Format or FLIF is a novel lossless image format which outperforms PNG, lossless WebP, lossless BPG, lossless JPEG2000, and lossless JPEG XR in terms of compression ratio.

Phew can open and display FLIF images, and can export them as PNG, TIFF, BMP or raw pixel data. If the accompanying QuickLook Plug-In is installed, FLIF images show thumbnails and previews in the Finder and Spotlight just like regular images.

Animated FLIF images are currently not supported.

Installation

The Phew source code contains the FLIFImage class, which is an Objective-C wrapper to easily read images in the FLIF format via libflif. This class is available via CocoaPods. See below for further info.

Phew is also available through Homebrew Caskroom

brew cask install phew

Screenshots

Phew Screenshot

Phew Screenshot

Phew Screenshot

Phew Screenshot

Phew Screenshot

FLIFImage Objective-C Class

FLIFImage is an Objective-C wrapper to easily read images in the FLIF format via libflif, the official FLIF reference decoder implementation. You can install via CocoaPods.

FLIFImage exposes the following class methods:

+ (BOOL)isFLIFImageAtPath:(NSString *)path;
+ (BOOL)isFLIFImageData:(NSData *)data;

+ (NSImage *)imageFromFileAtPath:(NSString *)path;
+ (CGImageRef)newCGImageFromFileAtPath:(NSString *)path;

+ (NSImage *)imageFromData:(NSData *)data;
+ (CGImageRef)newCGImageFromData:(NSData *)data;

Those calling newCGImage* methods are responsible for releasing the returned CGImageRef.

License

Phew uses libflif, which is distributed under the GNU Lesser General Public License (LGPL), version 3 or later. Phew itself is also open source software, available under the three-clause BSD license:

Copyright (c) 2017, Sveinbjorn Thordarson <[email protected]>

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.