Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
one bit transparency
#14
Exported a 20x20 1-bit BMP from GIMP.  It has a 45 rotated square in the middle and a pixel in each corner.

Here it is in bash...


Code:
tail -c +62 1bit-diamond-20x20.bmp | hexdump -v -e '/1 "%u\n"' | xargs -I {} echo -e "obase=2\n{}" | bc | xargs printf "%8s" | sed 's/[0 ]/_/g' | while read -n 32 row ; do echo "$row" ; done
__________1111111111111111______
__________1111111111111111______
________11111111111111111111____
________11111111111111111111____
________111111111__111111111____
________11111111____11111111____
________1111111______1111111____
________111111________111111____
________11111__________11111____
________1111____________1111____
________1111____________1111____
________11111__________11111____
________111111________111111____
________1111111______1111111____
________11111111____11111111____
________111111111__111111111____
________11111111111111111111____
________11111111111111111111____
__________1111111111111111______
__________1111111111111111______
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: