Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2684
| From | Carlos <angus@quovadis.com.ar> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: 1 bit RGB image representation problem |
| Date | 2016-06-30 12:19 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <nl2ro6$4nt$1@dont-email.me> (permalink) |
| References | (1 earlier) <875df2f7-19a0-4103-8f46-a81093e1b118@googlegroups.com> <fca1ed29-394c-4ced-9b22-99a5d8df8112@googlegroups.com> <4dcf1d03-0b39-44a4-9c4e-c716ba1d1d44@googlegroups.com> <8048fb28-42ab-4325-9870-d30c5542a356@googlegroups.com> <e249e657-680b-4ca2-ad38-b2da78cd0121@googlegroups.com> |
On 30/06/2016 2:15, luser droog wrote:
[...]
> Yes, that's roughly what I was thinking. I think the last byte of
> each row will need to be padded with zero bits. So if your image
> was 6x4, it would be laid out like this:
>
> rgbrgbrg brgbrgbr gb000000
> rgbrgbrg brgbrgbr gb000000
> rgbrgbrg brgbrgbr gb000000
> rgbrgbrg brgbrgbr gb000000
>
> But I still haven't found any specific documentation that speaks
> to this. So, it still might not work. :/
It does work that way, at least in Ghostscript.
%!PS
/to_s {
dup length dup string 0 1 4 -1 roll 1 sub {
3 copy exch pop get
3 copy put pop pop
} for
exch pop
} def
/img <<
/ImageType 1
/Width 3
/Height 3
/ImageMatrix [ 3 0 0 -3 0 3 ]
/DataSource [
% col [0][1][2 ][pad ]
2#11111010 2#10000000
2#10001101 2#00000000
2#00100011 2#10000000
] to_s
/BitsPerComponent 1
/Decode [ 0 1 0 1 0 1 ]
>> def
gsave
/DeviceRGB setcolorspace
200 200 translate
100 100 scale
img image
grestore
showpage
--
Back to comp.lang.postscript | Previous | Next — Previous in thread | Find similar | Unroll thread
1 bit RGB image representation problem bhor.pranjal@gmail.com - 2016-06-23 05:01 -0700
Re: 1 bit RGB image representation problem luser droog <luser.droog@gmail.com> - 2016-06-23 21:02 -0700
Re: 1 bit RGB image representation problem bhor.pranjal@gmail.com - 2016-06-24 21:22 -0700
Re: 1 bit RGB image representation problem luser droog <luser.droog@gmail.com> - 2016-06-24 22:51 -0700
Re: 1 bit RGB image representation problem bhor.pranjal@gmail.com - 2016-06-25 00:00 -0700
Re: 1 bit RGB image representation problem luser droog <luser.droog@gmail.com> - 2016-06-29 17:15 -0700
Re: 1 bit RGB image representation problem Carlos <angus@quovadis.com.ar> - 2016-06-30 12:19 +0200
csiph-web