Mercurial > octave-libtiff
comparison scripts/io/Tiff.m @ 31202:be6ccdcd5775
Tiff: added isBigEndian and getDirectoryOffset methods to the class
* scripts/io/Tiff.m: added isBigEndian and getDirectoryOffset methods
to the class.
* libtinterp/corefcn/tiff.cc: added __tiff_is_big_endian__ and
__tiff_get_directory_offset__ as internal functions for isBigEndian
and getDirectoryOffset repectively.
* scripts/image/private/__tiff_imfinfo__.m: used the two new methods
to get the corresponding info fields.
author | magedrifaat <magedrifaat@gmail.com> |
---|---|
date | Fri, 02 Sep 2022 21:20:56 +0200 |
parents | 30b28458bb06 |
children | df8ee95752aa |
comparison
equal
deleted
inserted
replaced
31201:e5e8cb049b4b | 31202:be6ccdcd5775 |
---|---|
225 | 225 |
226 function stripLength = getDefaultStripLength (t) | 226 function stripLength = getDefaultStripLength (t) |
227 stripLength = __tiff_default_strip_length__ (t.tiff_handle); | 227 stripLength = __tiff_default_strip_length__ (t.tiff_handle); |
228 endfunction | 228 endfunction |
229 | 229 |
230 function tf = isBigEndian (t) | |
231 tf = __tiff_is_big_endian__ (t.tiff_handle); | |
232 endfunction | |
233 | |
230 function dirNum = currentDirectory (t) | 234 function dirNum = currentDirectory (t) |
231 dirNum = __tiff_current_directory__ (t.tiff_handle); | 235 dirNum = __tiff_current_directory__ (t.tiff_handle); |
232 endfunction | 236 endfunction |
233 | 237 |
234 function isLast = lastDirectory (t) | 238 function isLast = lastDirectory (t) |
251 __tiff_rewrite_directory__ (t.tiff_handle); | 255 __tiff_rewrite_directory__ (t.tiff_handle); |
252 endfunction | 256 endfunction |
253 | 257 |
254 function setSubDirectory (t, offset) | 258 function setSubDirectory (t, offset) |
255 __tiff_set_sub_directory__ (t.tiff_handle, offset); | 259 __tiff_set_sub_directory__ (t.tiff_handle, offset); |
260 endfunction | |
261 | |
262 function offset = getDirectoryOffset (t) | |
263 offset = __tiff_get_directory_offset__ (t.tiff_handle); | |
256 endfunction | 264 endfunction |
257 | 265 |
258 % TODO(maged): add documentation and make print_usage work | 266 % TODO(maged): add documentation and make print_usage work |
259 endmethods | 267 endmethods |
260 | 268 |