Giter Site home page Giter Site logo

dotneticnsreader's Introduction

BrokenEvent.Icns

.ICNS is OS X icon format (used as replacement of the Windows .ICO). This is also a container of the images of different sizes and compression methods.

This repository contains the C# implementation of reader of the .ICNS file format. Simple demo app and some test .ICNS files are included.

The Source

Broken Event does not claim to be author of the original code.

The original is Java framework from here:

http://code.google.com/p/appengine-awt/

The Broken Event has translated into C# and refactored the code.

Known Issues

  • Save feature saves only one image while ICNS may contain a few different images.

Usage

To use the codec you should add BrokenEvent.Icns to the project (in binary dll form or as sources).

JP2000 Codec

There are still no lightweight managed JP2000 codec. CSJ2K is unable to open 256x256 and 512x512 images in example ICNSes and falls with different errors. The temporary solution is use giant like FreeImage (which is native requires to lock app architecture to x86 (or x64)). I say giant because I have to use 5.5MB native lib just for single codec.

If you have different usable codec for JP2000, you should disable _FREEIMAGE preprocessor symbol and set your own callback method to BrokenEvent.LibIcns.IcnsDecoder.LoadJ2kImage.

Loading

To load .ICNS image you should call:

    IcnsImageParser.GetImages(filename)

or

    IcnsImageParser.GetImages(stream)

The result is List of IcnsImage. It is simple container for the System.Drawing.Bitmap and the format of the image.

You can also use

    IcnsImageParser.GetImage(filename)

to return the largest loaded image from the file or stream.

Saving

To save the .ICNS you should use

    IcnsImageParser.WriteImage(bitmap, filename)

or the System.IO.Stream overload.

dotneticnsreader's People

Contributors

preseverence avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.