Coder Social home page Coder Social logo

libraw-rs's People

Contributors

paolobarbolini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

libraw-rs's Issues

Sizes struct and Colordata simplified with clone?

Hello!

I've recently tried to implement the Colordata struct (corresponding to libraw_colordata_t), and I had what I would call a "good idea".

Right now we form the Sizes struct (our libraw_image_sizes_t) by copying all of the structs members individually. That's a lot of typing. What I ended up doing was removing sizes.rs, replacing it's pub use in lib.rs with pub use libraw_sys::libraw_image_sizes_t as Sizes; and forming it in rawimage.rs by cloning the struct, unsafe { (*self.processor.inner).sizes }.clone().

I think this is a sane way to not have to type out all the colordata members, but maybe there's some giant issue I'm missing.

Do you think this is okay to do? All the tests passed and my project that uses libraw-rs worked perfectly fine.

(I can make a PR with relevant changes if my blabbering above didn't make much sense.)

Windows support

Currently compiling on Windows (at least on CI) fails.

This is not a priority for me, since I'm not using this on Windows. I also don't have a Windows machine, so it's not that easy for me to look into, but it would be great to support all platforms.

By commenting out these likes

# TODO: fix
# - name: windows / stable
# os: windows-latest
and temporarily removing these ones
branches:
- master
you can make CI run the Windows job on your fork, and see what the problem is.

When working on this locally remember to clone submodules too

Expose preview and metadata

https://www.libraw.org/docs/API-datastruct.html#libraw_thumbnail_t

I've implemented functionality for this in my own fork (though it wouldn't be possible to merge it directly, since I've updated to the latest version of libraw for CR3 support), but the implementation could be reviewed.

https://www.libraw.org/docs/API-datastruct.html#libraw_imgother_t

Here, I think the impl would expose a number of getter methods, including for libraw_gps_info_t - possibly, in a more descriptive fashion than libraw does by default (gps timestamp might be hour, min, sec):

  typedef struct
  {
    float latitude[3];     /* Deg,min,sec */
    float longitude[3];    /* Deg,min,sec */
    float gpstimestamp[3]; /* Deg,min,sec */
    float altitude;
    char  altref, latref, longref, gpsstatus;
    char  gpsparsed;
  } libraw_gps_info_t;

I would be happy to implement this functionality as well, but wanted to ask if it would be useful to provide support for Rust libraries for timestamps or similar fields.

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.