-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Add icon to the console wrapper, add option to set icon for the console wrapper on export. #68699
Conversation
… the console wrapper on export.
Why is our
Here's the difference in output for --- 1.log 2022-11-15 23:13:20.248916468 +0100
+++ 2.log 2022-11-15 23:13:29.411882190 +0100
@@ -1,5 +1,5 @@
Image:
- Filename: godot_6_256x256x32.png
+ Filename: godot6.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
@@ -663,7 +663,7 @@
1: (255,255,255,220) #FFFFFFDC srgba(255,255,255,0.862745)
1: (255,255,255,222) #FFFFFFDE srgba(255,255,255,0.870588)
Rendering intent: Perceptual
- Gamma: 0.454545
+ Gamma: 0.45455
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
@@ -682,9 +682,12 @@
Compression: Zip
Orientation: Undefined
Properties:
- date:create: 2022-11-15T22:08:37+00:00
- date:modify: 2022-11-15T22:08:37+00:00
- date:timestamp: 2022-11-15T22:13:20+00:00
+ date:create: 2022-11-15T22:08:58+00:00
+ date:modify: 2022-11-15T22:08:58+00:00
+ date:timestamp: 2022-11-15T22:13:29+00:00
+ png:bKGD: chunk was found (see Background color, above)
+ png:cHRM: chunk was found (see Chromaticity, above)
+ png:gAMA: gamma=0.45455 (See Gamma, above)
png:IHDR.bit-depth-orig: 8
png:IHDR.bit_depth: 8
png:IHDR.color-type-orig: 6
@@ -692,14 +695,15 @@
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 256, 256
png:sRGB: intent=0 (Perceptual Intent)
+ png:text: 3 tEXt/zTXt/iTXt chunks were found
signature: 1eb7b3fb0f4a402b6312aa801ee96a25cd9e220c6c74980e748d1a008315f9fb
Artifacts:
verbose: true
Tainted: False
- Filesize: 262548B
+ Filesize: 11289B
Number pixels: 65536
Pixel cache type: Memory
- Pixels per second: 7.18983MP
+ Pixels per second: 8.2755MP
User time: 0.010u
- Elapsed time: 0:01.009
+ Elapsed time: 0:01.007
Version: ImageMagick 7.1.0-52 Q16-HDRI x86_64 20549 https://imagemagick.org |
At some point icon was converted fo uncompressed bitmaps (IIRC, it's to allow overwriting it without rcedit, since it's constant size and do not need exe/resource metadata modification). I do not think it was the best idea, but I guess at least someone who did it need this for some reason. |
All mentioned issues related to embedded PCK should be already fixed, so if 250 KB is a big deal it might be worth reverting icon conversion. |
Yeah I wasn't convinced at the time and I'm still unconvinced by that change. The fact that it requires the PR author's own tool to author icons in a specific format doesn't strike me as more user-friendly than using rcedit, which is required anyway to edit any other data aside from the icon. #64073 seems like it was possibly caused by that change too. Anyway, that's outside the scope of this PR, we can assess that further independently. |
Thanks! |
We could modify the editor's export code to perform hex editing on the icon (and text-based metadata, if we add space padding as I mentioned in #57850). This would remove the need to use the author's external tool while also removing the need to use rcedit (and WINE on Linux). |
Pros: Console executable have an icon.
Cons: Console executable is 350 KB larger (~400 KB, was ~50 KB).