Skip to content

Uncaught TypeError: Assignment to constant variable. #2

Open
@Blatman

Description

@Blatman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions