Mercurial > octave-libtiff
diff libinterp/dldfcn/__tiff__.cc @ 31159:e960e3a3b3f6
Tiff.m: added structs for tag value enums to the Tiff class.
author | magedrifaat <magedrifaat@gmail.com> |
---|---|
date | Mon, 08 Aug 2022 00:06:19 +0200 |
parents | f2ae7763739a |
children |
line wrap: on
line diff
--- a/libinterp/dldfcn/__tiff__.cc Sat Aug 06 21:59:26 2022 +0200 +++ b/libinterp/dldfcn/__tiff__.cc Mon Aug 08 00:06:19 2022 +0200 @@ -203,7 +203,6 @@ // ASSUMES tiled image and tile_no is a valid zero-based tile // index for the tif image - // TODO(maged): check matlab behavior // TODO(maged): refactor into a function? uint32_t tile_width, tile_height; if (! TIFFGetField (tif, TIFFTAG_TILELENGTH, &tile_height)) @@ -303,7 +302,7 @@ image_data->samples_per_pixel); else if (image_data->planar_configuration == PLANARCONFIG_SEPARATE) corrected_dims = dim_vector (corrected_height, corrected_width); - // TODO(maged): confirm matlab behavior + tile_data.resize (corrected_dims); return octave_value (tile_data); @@ -1701,7 +1700,9 @@ void write_image (TIFF *tif, T pixel_data, tiff_image_data *image_data) { - // TODO(maged): check behavior in matlab + // TODO(maged): matlab sets the remaining to zero for less width and height + // and issues a warning for larger widths but not for larger height? + // and errors for less or more number of channels if (image_data->height != pixel_data.dim1 () || image_data->width != pixel_data.dim2 () || pixel_data.ndims () > 3 @@ -1969,7 +1970,6 @@ if (TIFFIsTiled (tif)) error ("The image is tiled not stripped"); - // TODO(maged): what is the behavior in matlab uint32_t strip_no; if (args(1).is_scalar_type ()) strip_no = args(1).uint32_scalar_value (); @@ -2005,7 +2005,6 @@ if (! TIFFIsTiled (tif)) error ("The image is stripped not tiled"); - // TODO(maged): what is the behavior in matlab uint32_t tile_no; if (args(1).is_scalar_type ()) tile_no = args(1).uint32_scalar_value ();