RSS/Atom feed Twitter
Site is read-only, email is disabled

8 and 1 bit images

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

19 of 19 messages available
Toggle history

Please log in to manage your subscriptions.

8 and 1 bit images jgarnold 26 Sep 07:44
  8 and 1 bit images rich404 26 Sep 08:17
  8 and 1 bit images rich404 26 Sep 08:25
   8 and 1 bit images jgarnold 26 Sep 08:59
    8 and 1 bit images rich404 26 Sep 09:03
    8 and 1 bit images jgarnold 26 Sep 09:09
     8 and 1 bit images jgarnold 26 Sep 09:24
      8 and 1 bit images rich404 26 Sep 10:00
       8 and 1 bit images jgarnold 26 Sep 10:19
        8 and 1 bit images rich404 26 Sep 11:10
         8 and 1 bit images rich404 26 Sep 11:13
          8 and 1 bit images jgarnold 26 Sep 11:46
           8 and 1 bit images rich404 26 Sep 12:09
            8 and 1 bit images jgarnold 26 Sep 23:30
             8 and 1 bit images rich404 27 Sep 07:52
              8 and 1 bit images jgarnold 27 Sep 10:04
               8 and 1 bit images rich404 27 Sep 11:57
                8 and 1 bit images jgarnold 27 Sep 23:24
                 8 and 1 bit images rich404 28 Sep 12:17
2017-09-26 07:44:05 UTC (over 6 years ago)
postings
9

8 and 1 bit images

Hello
I would like to save some images as both 8 bit 256 grayscale image and also 1 bit (2 color black and white). I see I can convert an image to grayscale but how do you select that you want to save the image as an 8 bit image. Also how do I save a 1 bit (2 color black and white) as a 1 bit image or is it sufficient to save as an 8 bit image? Thanks

rich404
2017-09-26 08:17:38 UTC (over 6 years ago)

8 and 1 bit images

Hello
I would like to save some images as both 8 bit 256 grayscale image and also 1 bit (2 color black and white). I see I can convert an image to grayscale but how do you select that you want to save the image as an 8 bit image. Also how do I save a 1 bit (2 color black and white) as a 1 bit image or is it sufficient to save as an 8 bit image?
Thanks

Gimp can create a 1 bit - black/white image.

It needs to be converted to indexed mode Image -> Mode -> Indexed

Then check the 'Use black and white (1 bit) palette

You can then export the image as a gif or as a png

How to prove it is 1 bit. Imagemagick command line will give the image properties or for a GUI XnViewMP as the screenshot.

Comparative image sizes, RGB 197k , grey 76k, 1bit 6k

rich: www.gimp-forum.net

rich404
2017-09-26 08:25:34 UTC (over 6 years ago)

8 and 1 bit images

Hello
I would like to save some images as both 8 bit 256 grayscale image and also 1 bit (2 color black and white). I see I can convert an image to grayscale but how do you select that you want to save the image as an 8 bit image. Also how do I save a 1 bit (2 color black and white) as a 1 bit image or is it sufficient to save as an 8 bit image?
Thanks

oops.. missed the main question, Convert to grayscale Image -> Mode -> Grayscale

Export the image as a png or a jpeg (jpeg will use its 8 bit grayscale mode) or probably a tiff as well.

rich: www.gimp-forum.net

2017-09-26 08:59:15 UTC (over 6 years ago)
postings
9

8 and 1 bit images

oops.. missed the main question, Convert to grayscale Image -> Mode -> Grayscale

Export the image as a png or a jpeg (jpeg will use its 8 bit grayscale mode) or probably a tiff as well.

rich: www.gimp-forum.net

Thanks for th quick replies which is really appreciated. I have only recently started to use GIMP2 and so in 'learning mode' at present. I had been using an old version of Paint Shop Pro which wasn't written very well to handle memory and so I couldn't create layers with large image files which GIMP2 can.

rich404
2017-09-26 09:03:18 UTC (over 6 years ago)

8 and 1 bit images

Thanks for th quick replies which is really appreciated. I have only recently started to use GIMP2 and so in 'learning mode' at present. I had been using an old version of Paint Shop Pro which wasn't written very well to handle memory and so I couldn't create layers with large image files which GIMP2 can.

Used to use PSP 7 back in 2000 - ish.

Thinking about your original question, I was a little short on detail. If you need a 1 bit (B&W) image but retain some sort of shading, you need to enable dithering. It all depends on how you want the final result.

example see screenshot.

rich: www.gimp-forum.net

2017-09-26 09:09:43 UTC (over 6 years ago)
postings
9

8 and 1 bit images

Thanks for th quick replies which is really appreciated. I have only recently started to use GIMP2 and so in 'learning mode' at present. I had been using an old version of Paint Shop Pro which wasn't written very well to handle memory and so I couldn't create layers with large image files which GIMP2 can.

Opps that didn't work (convert to 1 bit) which resulted in an error when I attempted to save as a TIFF file (TIFF save cannot handle indexed images with alpha channel.) I should I guess explain what I am trying to do. I am creating photo realistic scenery for use withing Flight Simulator X. What I have to do is create a 'water mask' which is done by creating a layer and then using that layer to 'paint out' all the water areas using a BRUSH which is of color BLACK (0,0,0). This I have already done. I select that layer and then convert it to 1 bit and then attempt to EXPORT it as a TIFF image with NO COMPRESSION. That is when I get the error. Is there a way around that.

2017-09-26 09:24:32 UTC (over 6 years ago)
postings
9

8 and 1 bit images

Opps that didn't work (convert to 1 bit) which resulted in an error when I attempted to save as a TIFF file (TIFF save cannot handle indexed images with alpha channel.)
I should I guess explain what I am trying to do. I am creating photo realistic scenery for use withing Flight Simulator X. What I have to do is create a 'water mask' which is done by creating a layer and then using that layer to 'paint out' all the water areas using a BRUSH which is of color BLACK (0,0,0). This I have already done. I select that layer and then convert it to 1 bit and then attempt to EXPORT it as a TIFF image with NO COMPRESSION. That is when I get the error. Is there a way around that.

Sorry I forgot to mention that for this 'water mask' I do NOT need shading. For the 'blend mask' I do need shading but that is the one I need to have as a grayscale 8 bit image which I think I am ok with now

rich404
2017-09-26 10:00:02 UTC (over 6 years ago)

8 and 1 bit images

Sorry I forgot to mention that for this 'water mask' I do NOT need shading.
For the 'blend mask' I do need shading but that is the one I need to have as a grayscale 8 bit image which I think I am ok with now

oh...I know nothing about flight simulator x requirements

I can see what you are trying to do, but...

By definition 1 bit is black and white. Add an alpha channel and it is not 1 bit

The best I can suggest is not Gimp but command line ImageMagick.

depending on your OS (I use linux) a command

convert file.tif -channel rgba -alpha on -colorspace gray out.tif

might do the job. You can see the file properties from the screenshot. Adding alpha tacks on an 8 bit channel.

I suggest asking on the ImageMagick forum, where they are very helpful.

https://www.imagemagick.org/discourse-server/ in the User section

Give them as much info as possible, add a link to an example image if possible

rich: www.gimp-forum.net

  • imagemagick
    im.jpg (99.1 KB)
2017-09-26 10:19:47 UTC (over 6 years ago)
postings
9

8 and 1 bit images

oh...I know nothing about flight simulator x requirements

I can see what you are trying to do, but...

By definition 1 bit is black and white. Add an alpha channel and it is not 1 bit

The best I can suggest is not Gimp but command line ImageMagick.

depending on your OS (I use linux) a command

convert file.tif -channel rgba -alpha on -colorspace gray out.tif

might do the job. You can see the file properties from the screenshot. Adding alpha tacks on an 8 bit channel.

I suggest asking on the ImageMagick forum, where they are very helpful.

https://www.imagemagick.org/discourse-server/ in the User section

Give them as much info as possible, add a link to an example image if possible

rich: www.gimp-forum.net

Thanks I use Windows 7 64 bit.
I have seen reference to alpha channel but don't know that they are. Could you explain what an alpha channel is and is there a method of adding a layer which is not an alpha channel?

Maybe I can EXPORT to another format then import into Paint Shop Pro convert and save?

rich404
2017-09-26 11:10:28 UTC (over 6 years ago)

8 and 1 bit images

Thanks I use Windows 7 64 bit.
I have seen reference to alpha channel but don't know that they are. Could you explain what an alpha channel is and is there a method of adding a layer which is not an alpha channel?

Maybe I can EXPORT to another format then import into Paint Shop Pro convert and save?

An alpha channel is just a mask which tells the particular graphics application used that any pixel is 'transparent' often represented by that checker board pattern. Not all applications respect an alpha channel.

just do a search https://en.wikipedia.org/wiki/Alpha_compositing

You can try a png with mode set a indexed 1 bit. the properties look like the attached.

However, are you sure you are on the correct track, what does flight simulator require. A layer mask in Gimp is B&W where black is 100% 'transparent' and white is 100% 'opaque'. That provides the 'alpha channel'

(and ignore that Imagemagick command line, same as a Gimp grayscale with alpha. My bad info)

rich: www.gimp-forum.net

rich404
2017-09-26 11:13:43 UTC (over 6 years ago)

8 and 1 bit images

Hate this mailing list format.

Attached the wrong image. However it does demonstrate that not all applications will show transparency.

screenshot of properties attached

rich: www.gimp-forum.net

2017-09-26 11:46:02 UTC (over 6 years ago)
postings
9

8 and 1 bit images

Hate this mailing list format.

Attached the wrong image. However it does demonstrate that not all applications will show transparency.

screenshot of properties attached

The mask files needed are exactly what you state - the 'white' area is 'transparent' so when the original image (actually a satellite image of an area in the world) is 'compiled' together with the mask file the black area is interpreted as that part of the original image you want NOT included and the white area allows the corresponding area of the original image to 'show through'. I have attached the original satellite image and the 'water mask'. The black area in the water mask will result in all that part of the original satellite image being masked OUT and the white area will allow that part of the original satellite image to show through. Hope I have explained properly.
Apart from an obvious smaller TIFF file (1 bit) it apparently results in the compiled image file (a file type BGL which is used with Flight Simulator) also being smaller. I guess it's just to make smaller files. I must get back to the 'scenery forum' and ask some questions.

rich404
2017-09-26 12:09:33 UTC (over 6 years ago)

8 and 1 bit images

The mask files needed are exactly what you state - the 'white' area is 'transparent' so when the original image (actually a satellite image of an area in the world) is 'compiled' together with the mask file the black area is interpreted as that part of the original image you want NOT included and the white area allows the corresponding area of the original image to 'show through'.
I have attached the original satellite image and the 'water mask'. The black area in the water mask will result in all that part of the original satellite image being masked OUT and the white area will allow that part of the original satellite image to show through. Hope I have explained properly.
Apart from an obvious smaller TIFF file (1 bit) it apparently results in the compiled image file (a file type BGL which is used with Flight Simulator) also being smaller.
I guess it's just to make smaller files. I must get back to the 'scenery forum' and ask some questions.

looking at this

http://www.fsdeveloper.com/forum/threads/bland-mask-water-mask-how-to.18894/ it says

"quote" ...is the watermask. This gives water characteristics to any black area. The mask is an 8-bit tif using only black and white

So that is all you need. A grayscale image. If your image has transparency (an alpha channel) remove it

Layer -> Transparency -> Remove Alpha Channel

export as as a tif

2017-09-26 23:30:50 UTC (over 6 years ago)
postings
9

8 and 1 bit images

looking at this

http://www.fsdeveloper.com/forum/threads/bland-mask-water-mask-how-to.18894/ it says

"quote" ...is the watermask. This gives water characteristics to any black area. The mask is an 8-bit tif using only black and white

So that is all you need. A grayscale image. If your image has transparency (an alpha channel) remove it

Layer -> Transparency -> Remove Alpha Channel

export as as a tif

Thanks for your reply and advice. Maybe it's a personal preference but the guy who was replying to my thread at fsdeveloper.com suggested that I export the BLEND mask (layer where everything the user doesn't want to show painted with a 25% BLACK brush so the edges are a greyscale and blend nicely) as a 8bt 256 grayscale TIFF image and the water mask which is painted with a 100% BLACK brush as a 1 bit 2 color (black and white) TIFF. I guess they both can be as small as possible although he also reckons the 'compile file' (which uses the original satellite image and the water and blend mask image files) ends up smaller too. Once again just a preference of his to have all files as small as possible. I have in the past exported the mask/layer as a 24 bit BMP file and it all worked ok. Of course the BMP files are much larger.

rich404
2017-09-27 07:52:40 UTC (over 6 years ago)

8 and 1 bit images

Thanks for your reply and advice. Maybe it's a personal preference but the guy who was replying to my thread at fsdeveloper.com suggested that I export the BLEND mask (layer where everything the user doesn't want to show painted with a 25% BLACK brush so the edges are a greyscale and blend nicely) as a 8bt 256 grayscale TIFF image and the water mask which is painted with a 100% BLACK brush as a 1 bit 2 color (black and white) TIFF. I guess they both can be as small as possible although he also reckons the 'compile file' (which uses the original satellite image and the water and blend mask image files) ends up smaller too. Once again just a preference of his to have all files as small as possible. I have in the past exported the mask/layer as a 24 bit BMP file and it all worked ok. Of course the BMP files are much larger.

Well, heed your experts advice.

A couple of points, that you might already know.

The 'paint tools' have their own opacity setting. No need for a 25% brush.

The Paint Tool introduces anti-aliasing at the edge. For the 1 bit indexed image the anti-aliasing is 'lost'. Otherwise for 'hard' edges use the pencil tool.

Exporting as a tiff is not a problem, Use Mode -> Greyscale for 8 bit and

remove any alpha channel, then Mode -> Indexed -> black and white (1 bit) for that mask.

rich: www.gimp-forum.net

2017-09-27 10:04:05 UTC (over 6 years ago)
postings
9

8 and 1 bit images

Well, heed your experts advice.

A couple of points, that you might already know.

The 'paint tools' have their own opacity setting. No need for a 25% brush.

The Paint Tool introduces anti-aliasing at the edge. For the 1 bit indexed image the anti-aliasing is 'lost'. Otherwise for 'hard' edges use the pencil tool.

Exporting as a tiff is not a problem, Use Mode -> Greyscale for 8 bit and

remove any alpha channel, then Mode -> Indexed -> black and white (1 bit) for that mask.

rich: www.gimp-forum.net

Thanks for the extra information. The reason I use a '25% hardness' paint brush near the edge is so that the background satellite imagery will BLEND into the default Flight Simulator scenery instead of having a hard edge. Well that is what I have been told on a flight simulator scenery developers forum and also read in tutorials. With a blend mask the white area allows the background satellite image to fully show through and black does not allow it to show through. Every shade of grey in between allows slightly less of the satellite background image to show through. This results in the satellite imagery to blend with the standard scenery and not have a hard line along the edge. Hope I have explained properly. Like the attached blend mask (taken from a video tutorial). Note the 'shading' If there is a better method to produce a grey scale between the white and the black please advise.

rich404
2017-09-27 11:57:11 UTC (over 6 years ago)

8 and 1 bit images

...snip...
Every shade of grey in between allows

slightly less of the satellite background image to show through. This results in the satellite imagery to blend with the standard scenery and not have a hard line along the edge. Hope I have explained properly. Like the attached blend mask (taken from a video tutorial). Note the 'shading'
If there is a better method to produce a grey scale between the white and the black please advise.

As mentioned before it works exactly the same with a Gimp layer mask. Of course Gimp has various options, the standard is 'white' 100% transparency. Painting in it with black or various greys permits a layer under to show.

The only thing I suggest looking into when making your images, is possibly using a Gaussian blur which will create those blurred edges that create the blend.

rich: www.gimp-forum.net

2017-09-27 23:24:35 UTC (over 6 years ago)
postings
9

8 and 1 bit images

...snip...
Every shade of grey in between allows As mentioned before it works exactly the same with a Gimp layer mask. Of course Gimp has various options, the standard is 'white' 100% transparency. Painting in it with black or various greys permits a layer under to show.

The only thing I suggest looking into when making your images, is possibly using a Gaussian blur which will create those blurred edges that create the blend.

rich: www.gimp-forum.net

Thnaks
I have heard about Gaussian blur but not sure how it is implemented. In my ignorance wouldn't it apply the same all over the image? What if I want a wider section of 'graduation' than others. For example (and what I am attempting to achieve) a coast line where the deep water starts at the edge of the land in some areas and in others there is a gradual deepening of water from the edge of land to say 500 feet from the shore. Consider the attached image of a coastline and on the left you see deep water extending from the land and on the right side the water gradually becoming deeper.

rich404
2017-09-28 12:17:15 UTC (over 6 years ago)

8 and 1 bit images

Thnaks
I have heard about Gaussian blur but not sure how it is implemented. In my ignorance wouldn't it apply the same all over the image? What if I want a wider section of 'graduation' than others. For example (and what I am attempting to achieve) a coast line where the deep water starts at the edge of the land in some areas and in others there is a gradual deepening of water from the edge of land to say 500 feet from the shore.
Consider the attached image of a coastline and on the left you see deep water extending from the land and on the right side the water gradually becoming deeper.

Gaussian blur is in Filters -> Blur -> Gausian and you get some idea of the effect in the preview. It does apply the same over the whole image or selection so it can be constrained that way.

Beginning to forget the original question but using a gimp layer mask as an example.

1. The mask painted with hard edges

2. After gaussian blur applied

3. The mask applied in Gimp.

Experiment with Gimp, there are no hard-and-fast rules. Stick with your known procedures and try out other ways, then compare.

rich: www.gimp-forum.net