Coder Social home page Coder Social logo

mz2 / carpaccio Goto Github PK

View Code? Open in Web Editor NEW
118.0 5.0 14.0 256.17 MB

A fast Swift library for decoding images (including the usual formats + RAW files) + EXIF metadata.

License: MIT License

Swift 99.21% Shell 0.39% C 0.40%
swift swift-package-manager photography raw exif

carpaccio's Issues

Xcode 13 Beta

Hello, and I'd like to echo others in saying thank you for this project. It has been really helpful.

I found when using it in Xcode 13 Beta (on macOS 12.0 beta) I needed to make this change to Sources/Carpaccio/CIImage+Extensions.swift:

thejimmyg@2d0078c

+       // This is deprecated in XCode 13 Beta and causes the code not to build. What should be used instead?
+       // https://developer.apple.com/documentation/coreimage/cirawfilteroption/3334940-ciinputenableedrmodekey
        
        // Preserve pixel values beyond 0.0 … 1.0, which wide colour images will have
-       rawFilter.setValue(true, forKey: kCIInputEnableEDRModeKey)
+       // rawFilter.setValue(true, forKey: kCIInputEnableEDRModeKey)

Without it I get this error and the project won't build:

Cannot convert value of type 'CIRAWFilterOption' to expected argument type 'String'

I'm not sure what the correct thing to do is rather than just commenting that line out but with this change the code builds and seems to work OK to my eyes but I thought I'd ask if you knew a better solution?

See https://developer.apple.com/documentation/coreimage/cirawfilteroption/3334940-ciinputenableedrmodekey

Thanks!

Not working with Fuji RAF files

I've tried using your library with Fuji .RAF files and it failed to load the image metadata.

Adding "raf" to the list of RAWImageFileExtensions seems to fix the problem.

Any chance you can add this?

ImageMetadata loaded with loadFullSizeImage doesn't contain valuable information

ImageMetadata doesn't contain valuable information when you call
loadFullSizeImage(options: FullSizedImageLoadingOptions, handler: @escaping PresentableImageHandler, errorHandler: @escaping ImageLoadingErrorHandler)

because the handler is run with empty ImageMetadata: handler(nonNilNakedImage, ImageMetadata(nativeSize: nonNilNakedImage.size))

I think this should be changed to handler(nonNilNakedImage, metadata)

CIImage creation out of Sony ARW from iOS

Hi! Thank you for the great work!

Did you notice by any chance that Sony ARW photos are not getting processed on iOS? (The same exact snippet working on macOS M1).

I'm joining an example image.

sony_a7s_iii_20.arw.zip

And the example code.

let loader = ImageLoader(imageURL: fileItem.url, thumbnailScheme: ImageLoader.ThumbnailScheme.decodeFullImage)
let (ciImage, metadata) = try loader.loadCIImage(options: ImageLoadingOptions(allowDraftMode: true), cancelled: nil)
// On iOS, the line above throws the exception "Failed to decode image at [...]" while it completes correctly on macOS.

Thank you!

Cannot select "Carpaccio.xcodeproj" in "Embedded Binaries"

Couldn't select "Carpaccio.xcodeproj" in "Embedded Binaries" so i added "Carpaccio.frameworkiOS".
When i added code given in the document to process RAW file it throws error ---> Use of unresolved identifier 'RAWImageLoader'.
Help me to solve this problem.
Thanks!!

Support for more metadata fields?

First off, thanks for making this project! It's been really helpful for loading and grabbing thumbnails of photos, especially RAW photos!

I'm wondering if there are plans to add more metadata fields in the future? Ones that come to mind are lens info, exif data like Title, Description, etc. If this should be in user-land, maybe just exposing the metadata dict in either the ImageLoader or ImageMetadata structs?

I'm happy to take a first pass at a PR, but wanted to check if there was a reason they were left out from the project.

Image size related test failure

@markuspiipari I noticed after your recent changes, Travis is complaining regarding one of the EXIF metadata / image size related tests:

[CarpaccioTests_iOS.CarpaccioTests testSonyRAWConversion] : XCTAssertEqual failed: ("1078.0") is not equal to ("1080.0") -

Make Podspec working

Hi,

I was trying to update your Podspec, unfortunately it's still not working (see my branch), but I think together we can figure out this problem.

Currently, I have the following problems:

- ERROR | file patterns: The `preserve_paths` pattern did not match any file.
- ERROR | file patterns: The `vendored_libraries` pattern did not match any file.
- ERROR | xcodebuild: Returned an unsuccessful exit code.
- ERROR | xcodebuild:  Carpaccio/Carpaccio/RAWConverter.h:27:46: error: unknown type name 'NSImage'
- NOTE  | xcodebuild:  Carpaccio/Carpaccio/RAWConverter.mm:11:9: fatal error: 'Cocoa/Cocoa.h' file not found

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.