Skip to content

Commit

Permalink
raw-load: remoe bps property, we always want 16bpc buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
hodefoting committed Feb 15, 2016
1 parent 19d71ed commit 5510aab
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions operations/external/raw-load.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
property_file_path (path, "File", "")
description (_("Path of file to load."))
property_int (image_num, "Image number", 0)
property_int (bps, "bits per sample", 16)
property_int (quality, "quality", 10)

#else
Expand Down Expand Up @@ -93,7 +92,7 @@ prepare (GeglOperation *operation)
p->LibRaw->params.gamm[1] = 1.0;
p->LibRaw->params.no_auto_bright = 1;

p->LibRaw->params.output_bps = o->bps > 8 ? 16 : 8;
p->LibRaw->params.output_bps = 16;
p->LibRaw->params.user_qual = o->quality;

if ((ret = libraw_open_file(p->LibRaw, o->path)) != LIBRAW_SUCCESS)
Expand Down Expand Up @@ -170,20 +169,10 @@ process (GeglOperation *operation,
rect.width = p->image->width;
rect.height = p->image->height;

if (p->image->bits == 8)
{
if (p->image->colors == 1)
format = babl_format ("Y u8");
else // 3 color channels
format = babl_format ("RGB u8");
}
else // 16-bit
{
if (p->image->colors == 1)
format = babl_format ("Y u16");
else // 3 color channels
format = babl_format ("RGB u16");
}
if (p->image->colors == 1)
format = babl_format ("Y u16");
else // 3 color channels
format = babl_format ("RGB u16");

gegl_buffer_set (output, &rect, 0, format, p->image->data, GEGL_AUTO_ROWSTRIDE);
return TRUE;
Expand Down

0 comments on commit 5510aab

Please sign in to comment.