Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #896 > unrolled thread
| Started by | markus.mail@kdwelt.de |
|---|---|
| First post | 2012-08-23 13:05 -0700 |
| Last post | 2012-08-24 10:46 -0700 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.postscript
How can I output a colored or gray raster image without deleting the existing content? markus.mail@kdwelt.de - 2012-08-23 13:05 -0700
Re: How can I output a colored or gray raster image without deleting the existing content? Helge Blischke <h.blischke@acm.org> - 2012-08-23 22:38 +0200
Re: How can I output a colored or gray raster image without deleting the existing content? luser- -droog <mijoryx@yahoo.com> - 2012-08-23 19:29 -0700
Re: How can I output a colored or gray raster image without deleting the existing content? markus.mail@kdwelt.de - 2012-08-24 10:46 -0700
| From | markus.mail@kdwelt.de |
|---|---|
| Date | 2012-08-23 13:05 -0700 |
| Subject | How can I output a colored or gray raster image without deleting the existing content? |
| Message-ID | <eb9d9d41-e6de-4156-b5ab-be8726b3d0be@googlegroups.com> |
Hello, I want to display a raster image on a specified area but the existing drawing in this area should be preserved (as much as it possible and makes sense). With monochrome images this is no problem if you use "imagemask" (not "image"). Look at PLRM 4.10.6 (Masks): "Any portion of an image, whether black, white, color, or gray, completely obscures any marks that previously existed in the same place on the page. There is a special variant of a binary image, called a mask, whose properties are quite different. Whereas an image is opaque, a mask is partially transparent. The imagemask operator applies masks." How can I do the same with "colorimage"? Analogous with above paragraph it would be something like "colorimagemask". Unfortunately this operator seems not to be available. Any hints? [P.S. On Postscript, imagemask is a somewhat special operator. It includes both what to draw _and_ where to draw. On X11/GTK this is defined separately: GDK_GC_SET_CLIP_MASK defines where to draw and GDK_DRAW_GRAY_IMAGE or GDK_DRAW_RGB_IMAGE define what to draw. For monochrome images you use GDK_DRAW_RECTANGLE after setting a color. This "fills" the image area, but effects only places where the clipping mask is true.] Markus
[toc] | [next] | [standalone]
| From | Helge Blischke <h.blischke@acm.org> |
|---|---|
| Date | 2012-08-23 22:38 +0200 |
| Message-ID | <a9nimeF9aeU1@mid.individual.net> |
| In reply to | #896 |
markus.mail@kdwelt.de wrote: > Hello, > > I want to display a raster image on a specified area but the existing > drawing in this area should be preserved (as much as it possible and makes > sense). > > With monochrome images this is no problem if you use "imagemask" (not > "image"). Look at PLRM 4.10.6 (Masks): "Any portion of an image, whether > black, white, color, or gray, completely obscures any marks that > previously existed in the same place on the page. There is a special > variant of a binary image, called a mask, whose properties are quite > different. Whereas an image is opaque, a mask is partially transparent. > The imagemask operator applies masks." > > How can I do the same with "colorimage"? Analogous with above paragraph it > would be something like "colorimagemask". Unfortunately this operator > seems not to be available. > > Any hints? > > [P.S. On Postscript, imagemask is a somewhat special operator. It includes > [both what to draw _and_ where to draw. On X11/GTK this is defined > [separately: GDK_GC_SET_CLIP_MASK defines where to draw and > [GDK_DRAW_GRAY_IMAGE or GDK_DRAW_RGB_IMAGE define what to draw. For > [monochrome images you use GDK_DRAW_RECTANGLE after setting a color. This > ["fills" the image area, but effects only places where the clipping mask > [is true.] > > Markus In language level 3, this can be achieved by using a) the dictionary form of the image operator and b) using a type3 of type4 image dictionary For the details see the PLRM (3rd ed.), section 4.10.6: Masked Images Helge
[toc] | [prev] | [next] | [standalone]
| From | luser- -droog <mijoryx@yahoo.com> |
|---|---|
| Date | 2012-08-23 19:29 -0700 |
| Message-ID | <7865f7ca-c0b0-4507-b078-f555aa4e80f2@googlegroups.com> |
| In reply to | #896 |
On Thursday, August 23, 2012 3:05:16 PM UTC-5, (unknown) wrote: > Hello, > > > > I want to display a raster image on a specified area but the existing drawing in this area should be preserved (as much as it possible and makes sense). > > > > With monochrome images this is no problem if you use "imagemask" (not "image"). Look at PLRM 4.10.6 (Masks): "Any portion of an image, whether black, white, color, or gray, completely obscures any marks that previously existed in the same place on the page. There is a special variant of a binary image, called a mask, whose properties are quite different. Whereas an image is opaque, a mask is partially transparent. The imagemask operator applies masks." > > > > How can I do the same with "colorimage"? Analogous with above paragraph it would be something like "colorimagemask". Unfortunately this operator seems not to be available. > > > > Any hints? > > > > [P.S. On Postscript, imagemask is a somewhat special operator. It includes both what to draw _and_ where to draw. On X11/GTK this is defined separately: GDK_GC_SET_CLIP_MASK defines where to draw and GDK_DRAW_GRAY_IMAGE or GDK_DRAW_RGB_IMAGE define what to draw. For monochrome images you use GDK_DRAW_RECTANGLE after setting a color. This "fills" the image area, but effects only places where the clipping mask is true.] > There's an article that covers this in the Acumen Journal #34 from August 2004. It's called "Color Key Image Masking." http://www.acumentraining.com/acumenjournal.html
[toc] | [prev] | [next] | [standalone]
| From | markus.mail@kdwelt.de |
|---|---|
| Date | 2012-08-24 10:46 -0700 |
| Message-ID | <329deb3f-7ad2-4011-b872-e99437a7f58a@googlegroups.com> |
| In reply to | #898 |
I want to thank you both for your help! I have solved my problem with a image operator using a type /ImageType 4 dictionary. Interestingly with Postscript you can define what color should be treated "transparent" directly. It even could be defined with a range. In X11/GTK I had to setup the mask myself. Markus
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.postscript
csiph-web