changeset 31195:f8baeb850b36

Tiff: Moved PKG_ADD logic to Tiff.m.
author magedrifaat <magedrifaat@gmail.com>
date Tue, 30 Aug 2022 20:32:50 +0200
parents 0cdb7f35641e
children 1da6d747bf78
files libinterp/corefcn/__tiff__.cc scripts/io/Tiff.m
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/__tiff__.cc	Sun Aug 28 21:34:03 2022 +0200
+++ b/libinterp/corefcn/__tiff__.cc	Tue Aug 30 20:32:50 2022 +0200
@@ -142,7 +142,7 @@
   }
 
   // A map of tag names supported by matlab, there are some differences
-  // than LibTIFF's names (e.g. Photometric vs PhotometricInerpretation)
+  // than LibTIFF's names (e.g. Photometric vs PhotometricInterpretation)
   static const std::map<std::string, ttag_t> tag_name_map = {
     {"SubFileType", 254},
     {"ImageWidth", 256},
--- a/scripts/io/Tiff.m	Sun Aug 28 21:34:03 2022 +0200
+++ b/scripts/io/Tiff.m	Tue Aug 30 20:32:50 2022 +0200
@@ -1,3 +1,17 @@
+## PKG_ADD: ## Discard result to avoid polluting workspace with ans at startup.
+## PKG_ADD: if __have_feature__ ("TIFF")
+## PKG_ADD:   [~] = imformats("update", "tif",
+## PKG_ADD:                   struct ("read", @__tiff_imread__,
+## PKG_ADD:                           "write", @__tiff_imwrite__,
+## PKG_ADD:                           "info", @__tiff_imfinfo__,
+## PKG_ADD:                           "ext", {{"tif", "tiff"}},
+## PKG_ADD:                           "isa", @__tiff_isa__,
+## PKG_ADD:                           "alpha", true,
+## PKG_ADD:                           "multipage", true,
+## PKG_ADD:                           "description", "Tagged Image File Format",
+## PKG_ADD:                           "coder", "TIFF"));
+## PKG_ADD: endif
+
 classdef Tiff
   properties (Constant = true)
     TagID = __tiff_make_tagid__ ();