Giter VIP home page Giter VIP logo

gaseosaluz / carpaccio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mz2/carpaccio

0.0 1.0 0.0 256.18 MB

A fast Swift library for decoding images (including the usual formats + RAW files) + EXIF metadata. Primary, guaranteed to be up to date source for Carpaccio is to be found at gitlab.com/sashimiapp-public/carpaccio.git.

License: MIT License

Ruby 1.70% Swift 97.53% Objective-C 0.64% Shell 0.13%

carpaccio's Introduction

Carpaccio Carthage compatible Cocoapods compatible build status

Pure Swift goodness for RAW and other image + metadata handling

Carpaccio is a Swift library for macOS and iOS that allows fast decoding of image data & EXIF metadata from file formats supported by CoreImage (including all the various RAW file formats supported, using the CoreImage RAW decoding capability).

  • thumbnails
  • metadata
  • full sized image

Carpaccio uses multiple CPU cores efficiently in parallel for all of metadata, thumbnail and image data decoding.

There are no 3rd party dependencies (CoreImage filter is used for RAW decoding).

NOTE! If you are looking at this on GitHub, please be noted that the primary source for Carpaccio is to be found at gitlab.com/sashimiapp-public/carpaccio.git.

INSTALLATION

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Carpaccio into your Xcode project using Carthage, specify it in your Cartfile:

github "mz2/Carpaccio" ~> 0.0.1

Run carthage update to build the framework and drag the built Carpaccio.framework into your Xcode project.

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate Carpaccio into your project manually.

Embedded Framework

  • Open up Terminal, cd into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:
$ git init
  • Add Carpaccio as a git submodule by running the following command:
$ git submodule add https://gitlab.com/sashimiapp-public/Carpaccio.git
  • Open the new Carpaccio folder, and drag the Carpaccio.xcodeproj into the Project Navigator of your application's Xcode project.

    It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.

  • Select the Carpaccio.xcodeproj in the Project Navigator and verify the deployment target matches that of your application target.

  • Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.

  • In the tab bar at the top of that window, open the "General" panel.

  • Click on the + button under the "Embedded Binaries" section.

  • Select the Carpaccio.xcodeproj nested inside a Products folder now visible.

The Carpaccio.framework is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.

(This manual installation section was shamelessly ripped from the excellent Alamofire instructions.)

USAGE

Adapting from a test included in the test suite for the framework, here's how you can use Carpaccio:

    let converter = RAWImageLoader(imageURL: img1URL, thumbnailScheme: .fullImageWhenThumbnailMissing)

    converter.loadThumbnailImage(handler: { thumb, imageMetadata in
        // deal with thumbnail + metadata 
    }) { error in
        // deal with the error 
    }

There's a lot more to it though, including different schemes for loading thumbnails or using full size images when thumbnails are not found or are too small, and decoding thumbnails / full images at a specified maximum resolution.

Documentation and tests are minimal so for now you'll just need to explore the API to discover all the good stuff. Please feel free to make suggestions as issues on GitHub.

TODO

Carpaccio is still a very fresh and raw (har har) library and there are many tasks to make this a more generally useful library.

  • Add tests for RAWs from a number of different camera vendors.
  • GitLab CI support.
  • iOS support.

carpaccio's People

Contributors

mz2 avatar markuspiipari avatar numair avatar

Watchers

James Cloos 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.