From 4f87d1a195ce83aecab3083cefc1e46578a1a37c Mon Sep 17 00:00:00 2001 From: gnosygnu Date: Wed, 26 Aug 2020 09:01:43 -0400 Subject: [PATCH] Image: Mark tif orig files as not images [#788] --- 400_xowa/src/gplx/xowa/files/Xof_ext_.java | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/400_xowa/src/gplx/xowa/files/Xof_ext_.java b/400_xowa/src/gplx/xowa/files/Xof_ext_.java index 71cbaf3f4..b487e1cea 100644 --- a/400_xowa/src/gplx/xowa/files/Xof_ext_.java +++ b/400_xowa/src/gplx/xowa/files/Xof_ext_.java @@ -13,9 +13,17 @@ The terms of each license can be found in the source code repository: GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt */ -package gplx.xowa.files; import gplx.*; import gplx.xowa.*; -import gplx.core.primitives.*; -public class Xof_ext_ { +package gplx.xowa.files; + +import gplx.Bry_; +import gplx.Bry_find_; +import gplx.Byte_ascii; +import gplx.Err_; +import gplx.Hash_adp; +import gplx.Hash_adp_bry; +import gplx.core.primitives.Int_obj_val; + +public class Xof_ext_ { public static final int Id_unknown = 0 // SERIALIZED; ids are saved to fsdb; , Id_png = 1, Id_jpg = 2, Id_jpeg = 3, Id_gif = 4, Id_tif = 5, Id_tiff = 6 , Id_svg = 7, Id_djvu = 8, Id_pdf = 9 @@ -118,9 +126,14 @@ public class Xof_ext_ { } public static boolean Orig_file_is_img(int v) { // identifies if orig_file can be used for ; EX: png is valid, but svg, ogv, pdf is not switch (v) { - case Id_png: case Id_jpg: case Id_jpeg: - case Id_gif: case Id_tif: case Id_tiff: return true; - default: return false; + case Id_png: + case Id_jpg: case Id_jpeg: + case Id_gif: + return true; + // 2020-08-25|ISSUE#:788|tif files cannot be rendered natively by Firefox / Chrome + case Id_tif: case Id_tiff: + default: + return false; } } public static boolean Id_supports_page(int v) { // identifies if tid supports page in lnki; EX: [[File:A.pdf|page=1]]; REF: https://en.wikipedia.org/wiki/Wikipedia:Picture_tutorial; DATE:2014-01-18