Coder Social home page Coder Social logo

dcraw.js's People

Contributors

zfedoran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dcraw.js's Issues

This library seems to take a very long time to convert a large raw

I decided to give this a shot as part of a simple Lightroom catalog helper utility (lrcat files are just sqlite3 databases, so finding image locations and creating thumbnails for them is basically trivial), but it takes 20 seconds to convert a 6000x4000px, 26MB NEF to a 76MB (!) TIFF, on an i7-6700 with more RAM than makes sense in almost any machine.

Is there a way to tell this port to do a resize-while-loading of the NEF data, so that it only tries to work with 600x400px data, for instance? 20 seconds per thumbnail (even with result-caching) isn't really all that much better than "it doesn't work at all" =(

(using the dedicated thumbnail extraction is quite fast, but there are plenty of raws without a built in thumbnail...)

Minor fixes for current emscripten

There are two things that are now broken here:

  1. Making .o files now requires emcc be given the -c flag.
  2. You are missing an empty bin/src directory for dcraw.o to be written into.

I've fixed both on my local copy and it works nicely, and can even use the latest dcraw.c (which is only slightly newer than the one here).

Uncaught TypeError: Assignment to constant variable.

I get this error when trying to use setBrightnessLevel and setCustomGammaCurve

Uncaught TypeError: Assignment to constant variable .... (@ dcraw.js:4)

Just seems to me that only the boolean options work with this code unless I am missing a trick with the syntax.
All the examples are with booleans as well

Tried -

var result = dcraw(buf, { setBrightnessLevel: 1.0 });  - fails and this is default
var result = dcraw(buf, { setBrightnessLevel: '1.0' });  - fails


var result = dcraw(buf, { setCustomGammaCurve: 2.4 12.92 }}); - fails
var result = dcraw(buf, { setCustomGammaCurve: 2.4, 12.92 }}); - fails
var result = dcraw(buf, { setCustomGammaCurve: '2.4', '12.92' }}); - fails
var result = dcraw(buf, { setCustomGammaCurve: { p: 2.4, ts: 12.92 }}); - fails


var result = dcraw(buf, { exportAsTiff: true }); - works OK 
var result = dcraw(buf, { extractThumbnail: true }); - works OK
var result = dcraw(buf, { });  // PPM - works OK
var result = dcraw(buf, { useRawMode: true });  - works OK

Cheers,

Blane

Cannot assign to "args" because it is a constant

Problem

In the generated lib output (dcraw/dist/dcraw.js), the const variable args is reassigned, which is causing an error (and preventing a valid build). The beautified output below shows this:

const args = [];
if (options) {
  ...
  for (var prop in options) {
    const val = options[prop];
    if (val !== undefined) {
      ...
      if (prop.match(/[A r C k S n H t o b g q m s]/)) {
        args = args.concat(val.toString().split(/\s/)) // <-------- reassignment
      }

Solution

The creation of the variable should use the let identifier so that it can be reassigned.

Thumbnail doesn't have correct rotation

I love this package, thank you! But the extracted thumbnail doesn't have the right rotation - it always comes out as landscape even for raw images that are portrait. Any ideas for how to fix?

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.