Mobile app version of vmapp.org
Login or Join
Nimeshi706

: Remove alpha channel from exported .tiff using GIMP I am using a program that requires a .tiff input with 8 bits (grayscale) and the 1 sample per pixel characteristic. I scale the layer down

@Nimeshi706

Posted in: #Alpha #Gimp #ImageQuality #Tiff

I am using a program that requires a .tiff input with 8 bits (grayscale) and the 1 sample per pixel characteristic. I scale the layer down in GIMP, keep the canvas the same size, choose grayscale, and turn off the alpha channel. Only 1 layer exists. However, when I export the image, the size is twice the original image, has two samples per pixel, and says that there is an alpha channel. The following is output from the sips command on OS X.

pixelWidth: 3296
pixelHeight: 2472
typeIdentifier: public.tiff
format: tiff
formatOptions: default
dpiWidth: 72.000
dpiHeight: 72.000
samplesPerPixel: 2
bitsPerSample: 8
hasAlpha: yes
space: Gray


My main guess is the alpha channel is saving when the layer is smaller than the canvas, even though the alpha channel is turned off for the layer. Any ideas why this is happening? Appreciate any answers.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi706

2 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi706

ANSWER:

When a .tiff image is scaled down and canvas is exposed, the 'file > export' command will produce a .tiff image where the empty canvas space is saved as transparent pixels. (thank you to @xenoid for helping me discover this issue)

Therefore, the empty space needs to be filled. Choose 'Layer > New Layer' from Visible and use the bucket to fill the empty areas with whatever color works. Then merge the layers using 'Image > Merge Visible Layers'.

Lastly, select the merged layer in the layers panel and select 'Remove alpha channel'.

The image can then be exported as a true grayscale image without the additional alpha channel value per pixel.

10% popularity Vote Up Vote Down


 

@Steve758

Works for me if I use grayscale mode. Saved with no compression:

identify 100x100-grayscale.tif
100x100-grayscale.tif TIFF 100x100 100x100+0+0 8-bit Grayscale DirectClass 10.3KB 0.000u 0:00.000


The 10K size is coherent with a single byte per pixel.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme