summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2022-05-14 20:01:57 +0000
committerChristos Zoulas <christos@zoulas.com>2022-05-14 20:01:57 +0000
commit912fb55c5e92ff5744be12e1e1d05aba090923e3 (patch)
tree8c3a1a26118d0eb1bed34f5049cbeb64b9378237
parentd6e0fa6fe3a6f07cb828869edbfb195821e1e164 (diff)
downloadfile-git-912fb55c5e92ff5744be12e1e1d05aba090923e3.tar.gz
Reduce rescale messages by ignoring powers of 2. This won't help
with textures that have a physical image size that isn't a power of 2, but most textures are powers of 2. (from David Korth)
-rw-r--r--magic/Magdir/images69
1 files changed, 60 insertions, 9 deletions
diff --git a/magic/Magdir/images b/magic/Magdir/images
index a4efab19..f1981947 100644
--- a/magic/Magdir/images
+++ b/magic/Magdir/images
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: images,v 1.220 2022/05/14 19:45:58 christos Exp $
+# $File: images,v 1.221 2022/05/14 20:01:57 christos Exp $
# images: file(1) magic for image formats (see also "iff", and "c-lang" for
# XPM bitmaps)
#
@@ -3679,7 +3679,7 @@
>>>13 ubyte x *bad colorspace %u*
-# Type: Godot 3,4 texture (pixel format)
+# Type: Godot 3, 4 texture (pixel format)
# From: David Korth <gerbilsoft@gerbilsoft.com>
0 name godot-pixel-format
>0 ulelong&0xFFFFF 0 L8
@@ -3721,7 +3721,56 @@
>0 ulelong&0xFFFFF 36 ETC2_RGB8A1
>0 ulelong&0xFFFFF 37 ASTC_8x8
-# Type: Godot 3.x texture.
+# Type: Godot 3, 4 texture (rescale display, width)
+# From: David Korth <gerbilsoft@gerbilsoft.com>
+# Shows rescale value if it's not a power of 2.
+0 name godot-rescale-display-w
+>0 uleshort 0
+>0 uleshort 1
+>0 uleshort 2
+>0 uleshort 4
+>0 uleshort 8
+>0 uleshort 16
+>0 uleshort 32
+>0 uleshort 64
+>0 uleshort 128
+>0 uleshort 256
+>0 uleshort 512
+>0 uleshort 1024
+>0 uleshort 2048
+>0 uleshort 4096
+>0 uleshort 8192
+>0 uleshort 16384
+>0 uleshort 32768
+>0 default x
+>>0 uleshort x (rescale to %u x
+
+# Type: Godot 3, 4 texture (rescale display, height)
+# From: David Korth <gerbilsoft@gerbilsoft.com>
+# Shows rescale value if it's not a power of 2.
+0 name godot-rescale-display-h
+>0 clear
+>0 uleshort 0
+>0 uleshort 1
+>0 uleshort 2
+>0 uleshort 4
+>0 uleshort 8
+>0 uleshort 16
+>0 uleshort 32
+>0 uleshort 64
+>0 uleshort 128
+>0 uleshort 256
+>0 uleshort 512
+>0 uleshort 1024
+>0 uleshort 2048
+>0 uleshort 4096
+>0 uleshort 8192
+>0 uleshort 16384
+>0 uleshort 32768
+>0 default x
+>>0 uleshort x %u)
+
+# Type: Godot 3 texture
# From: David Korth <gerbilsoft@gerbilsoft.com>
# References:
# - https://github.com/godotengine/godot/blob/3.3/core/image.h
@@ -3734,15 +3783,16 @@
>8 uleshort x %u
>6 uleshort 0 \b,
>6 uleshort !0
->>6 uleshort x (rescale to %u x
->>10 uleshort x %u),
+>>6 use godot-rescale-display-w
+>>10 use godot-rescale-display-h
+>>10 uleshort x \b,
>16 ulelong&0x800000 !0 has mipmaps,
>16 ulelong&0x100000 0x100000 lossless encoding
>16 ulelong&0x200000 0x200000 lossy encoding
>16 ulelong&0x300000 0
>>16 use godot-pixel-format
-# Type: Godot 4 texture.
+# Type: Godot 4 texture
# From: David Korth <gerbilsoft@gerbilsoft.com>
# References:
# - https://github.com/godotengine/godot/blob/master/core/io/image.h
@@ -3753,9 +3803,10 @@
!:ext stex
>4 ulelong x v%u:
>0x28 uleshort x %u x
->0x2A uleshort x %u (rescale to
->8 ulelong x %u x
->12 ulelong x %u),
+>0x2A uleshort x %u
+>8 use godot-rescale-display-w
+>12 use godot-rescale-display-h
+>12 uleshort x \b,
>0x2C ulelong >1 %u mipmaps,
>0x24 ulelong 0
>>0x30 use godot-pixel-format