Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
one bit transparency
#6
(11-05-2022, 10:34 PM)bitrat Wrote: 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.

There is a difference between the image in Gimp and was it exported (otherwise you wouldn't export JPEG from 32-bit FP images).

I tried this:
  • Create an image (white) fill a square with black
  • Create a palette with two colors; black and white
  • Image > Mode > Indexed and use the palette created above
  • Export as PNG (auto pixel format, will create an indexed PNG)
Result:

   

Code:
01:40:28 @ ~/ : >file /tmp/OneBPP.png
/tmp/OneBPP.png: PNG image data, 600 x 400, 1-bit colormap, interlaced

01:42:03 @ ~/ : >identify -verbose /tmp/OneBPP.png
Image: /tmp/OneBPP.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: PseudoClass
  Geometry: 600x400+0+0
  Resolution: 28.35x28.35
  Print size: 21.164x14.1093
  Units: PixelsPerCentimeter
  Colorspace: sRGB
  Type: Bilevel
  Base type: Undefined
  Endianess: Undefined
  Depth: 8/1-bit
  Channel depth:
    red: 1-bit
    green: 1-bit
    blue: 1-bit
  Channel statistics:
    Pixels: 240000
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 76.8124 (0.301225)
      standard deviation: 116.992 (0.458791)
      kurtosis: -1.24916
      skewness: 0.866513
      entropy: 0.882783
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 76.8124 (0.301225)
      standard deviation: 116.992 (0.458791)
      kurtosis: -1.24916
      skewness: 0.866513
      entropy: 0.882783
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 76.8124 (0.301225)
      standard deviation: 116.992 (0.458791)
      kurtosis: -1.24916
      skewness: 0.866513
      entropy: 0.882783
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 76.8124 (0.301225)
      standard deviation: 116.992 (0.458791)
      kurtosis: -1.24915
      skewness: 0.866516
      entropy: 0.882783
  Colors: 2
  Histogram:
    167706: (  0,  0,  0) #000000 black
     72294: (255,255,255) #FFFFFF white
  Colormap entries: 2
  Colormap:
         0: (  0,  0,  0) #000000 black
         1: (255,255,255) #FFFFFF white
  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: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: PNG
  Intensity: Undefined
  Compose: Over
  Page geometry: 600x400+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2022-11-06T01:40:20+01:00
    date:modify: 2022-11-06T01:40:20+01:00
    png:IHDR.bit-depth-orig: 1
    png:IHDR.bit_depth: 1
    png:IHDR.color-type-orig: 3
    png:IHDR.color_type: 3 (Indexed)
    png:IHDR.interlace_method: 1 (Adam7 method)
    png:IHDR.width,height: 600, 400
    png:pHYs: x_res=2835, y_res=2835, units=1
    png:PLTE.number_colors: 2
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 1 tEXt/zTXt/iTXt chunks were found
    png:text-encoded profiles: 1 were found
    png:tIME: 2022-11-06T00:40:20Z
    signature: 57ab66a2a4259e7d6d1351b2fbcb79e287ad34c0428b5cb3cd405e0d082a48bf
  Profiles:
    Profile-exif: 15064 bytes
  Artifacts:
    filename: /tmp/OneBPP.png
    verbose: true
  Tainted: False
  Filesize: 34712B
  Number pixels: 240000
  Pixels per second: 24MB
  User time: 0.000u
  Elapsed time: 0:01.009
  Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Reply


Messages In This Thread
one bit transparency - by bitrat - 11-05-2022, 02:37 AM
RE: one bit transparency - by denzjos - 11-05-2022, 09:16 AM
RE: one bit transparency - by bitrat - 11-05-2022, 07:28 PM
RE: one bit transparency - by rich2005 - 11-05-2022, 08:40 PM
RE: one bit transparency - by bitrat - 11-05-2022, 10:34 PM
RE: one bit transparency - by Ofnuts - 11-06-2022, 12:44 AM
RE: one bit transparency - by bitrat - 11-06-2022, 07:04 AM
RE: one bit transparency - by Ofnuts - 11-06-2022, 08:49 AM
RE: one bit transparency - by bitrat - 11-07-2022, 01:42 AM
RE: one bit transparency - by rich2005 - 11-06-2022, 11:29 AM
RE: one bit transparency - by bitrat - 11-07-2022, 04:59 AM
RE: one bit transparency - by denzjos - 11-07-2022, 09:51 AM
RE: one bit transparency - by bitrat - 11-07-2022, 08:40 PM
RE: one bit transparency - by bitrat - 11-07-2022, 11:59 PM
RE: one bit transparency - by denzjos - 11-08-2022, 09:51 AM

Forum Jump: