(11-05-2022, 08:40 PM)rich2005 Wrote: This has come up before see: https://www.gimp-forum.net/Thread-Export...with-Alpha
I do not know how you get a anti-alised 8-bit palette, even with Gimp 2.10 which throws in an extra indexed entry you just get 2
Work-flow:
Black-on-White image
Colour-to-Alpha to make black on transparent
Mode -> Indexed 1 bit.
You do not say which OS you are using. If you can get a Gimp 2.8 that might work for you.
ImageMagick - Same as you, I can not see any way of getting a 1 bit png out.
Hi rich2005,
I just found that link myself but thanks!
My GIMP doesn't allow me to create a black+white (1-bit) image. Minimum is 8-bit.
Every package seems determined to turn a bitmap into a grayscale at every opportunity, and to antialias screen rendering in the viewer, so it's often impossible to see whether the image itself is a bitmap or grayscale. Even the window manager is probably involved in this... Anyway, I'll update here when I've done some more experimenting.
I'm using GIMP 2.10.30 on Ubuntu 18.04. Due for a system rebuild, but too much on to do it right now..
No AppImage for 2.8 I'll just need to manage with current limitations for now. Basically, I'm trying to get pixel level control over grayscale rendering using the 'newsprint' dot screen filter. It's very annoying to have this option removed, presumably based on the assumption that antialiasing and grayscale are always better....
Thanks again for the reminder to try ImageMagick, but sounds like it won't get me far... I don't want extra steps in my workflow if I can help it, but it can be a lifesaver sometimes.
____________________________
UPDATE:
It looks like a PNG exported from a GIMP image created as per your suggestion is 8-bit RGB ...
Code:
$ identify test-1bit-alpha.png
test-1bit-alpha.png PNG 1024x683 1024x683+0+0 8-bit sRGB 4.48KB 0.000u 0:00.000
but it looks like it's 1-bit (black+alpha) under the hood, padded to 8-bits just to use extra disk space or some other misbegotten 'optimisation' ...
Code:
$ identify -verbose test-1bit-alpha.png
Image: test-1bit-alpha.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 1024x683+0+0
Resolution: 118.11x118.11
Print size: 8.66988x5.78274
Units: PixelsPerCentimeter
Type: Bilevel
Endianess: Undefined
Colorspace: sRGB
Depth: 8/1-bit
Channel depth:
gray: 1-bit
alpha: 1-bit
Channel statistics:
Pixels: 699392
Gray:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
entropy: -nan
Alpha:
min: 0 (0)
max: 255 (1)
mean: 51.7903 (0.203099)
standard deviation: 102.588 (0.402306)
kurtosis: 0.178562
skewness: -1.476
entropy: -nan
Alpha: graya(0,0) #00000000
Colors: 2
Histogram:
557346: ( 0, 0, 0, 0) #00000000 graya(0,0)
142046: ( 0, 0, 0,255) #000000FF graya(0,1)
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: graya(0,1)
Border color: graya(223,1)
Matte color: graya(189,1)
Transparent color: graya(0,0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 1024x683+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
Comment: Created with GIMP
date:create: 2022-11-06T11:46:11+13:00
date:modify: 2022-11-06T11:46:11+13:00
icc:copyright: Public Domain
icc:description: GIMP built-in sRGB
icc:manufacturer: GIMP
icc:model: sRGB
png:bKGD: chunk was found (see Background color, above)
png:iCCP: chunk was found
png:IHDR.bit-depth-orig: 2
png:IHDR.bit_depth: 2
png:IHDR.color-type-orig: 3
png:IHDR.color_type: 3 (Indexed)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 1024, 683
png:pHYs: x_res=11811, y_res=11811, units=1
png:PLTE.number_colors: 3
png:text: 1 tEXt/zTXt/iTXt chunks were found
png:tIME: 2022-11-05T22:46:11Z
png:tRNS: chunk was found
signature: 17cf50864f09dbe815449d6c9f96b0fabab283430f0375567ac4d732da83e9f7
Profiles:
Profile-icc: 672 bytes
Artifacts:
filename: test-1bit-alpha.png
verbose: true
Tainted: False
Filesize: 4.48KB
Number pixels: 699K
Pixels per second: 69.94MB
User time: 0.020u
Elapsed time: 0:01.010
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
I may get there yet...
Cheers,
bitrat