[vwnc] Image processing in a Headless image - is it possible?

Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Image processing in a Headless image - is it possible?

Joerg Beekmann, DeepCove Labs (YVR)
We have a headful server process that endorses some text onto the back
of a cheque image. That process has been running headful using VW 7.6 on
Windows for several years. We now want to run this process as headless
windows service and have encountered some issues with the endorsing
code. I've appended the full method showing what we are doing at the end
of the email, but the cruces of the problem is that in a HeadlessImage
"Mask extent" results in a DNU. This is because Screen default
defaultCoveragePolicy returns nil.
 
Doing some poking around we see that when running a headless a
HeadlessScreen is installed and is returned in response to "Screen
default". The headless screen is able to provide a defaultFontPolicy but
not a coverage policy. This seems to be because while Headless screen is
hard coded to return a HeadlessFontPolicy the paint policies are
installed in the instance side initialize method of HeadlessScreen, but
this method is never called as far as I can tell. The fix is not as
simple as calling initialize.
 
So my questions are:
1) Should I expect to be able to use the graphics system for image
manipulation in a headless image or do we need to go to using an
external image processing dll for this.
2) If VW can be used how? What we are trying to do is not that complex,
we simply want to put some text onto an BW image. The method showing
that we are doing is below.


 
 
=== here is what we are trying to do ====
endorse: string on: img at: offset
 | gc mask text point |
 point := ((img extent x * offset x) @ (img extent y * offset y))
rounded.
 gc := ScreenGraphicsContext on: (Mask extent: img extent on:
HeadlessScreen default).
 text := string asText.
 text emphasizeAllWith: (Array with: #bold with: #pointSize -> 34).
 text displayOn: gc at: point.
 mask := gc medium asImage.
 mask
  copy: (0 @ 0 extent: mask extent)
  from: 0 @ 0
  in: mask
  rule: 8.
 mask palette: img palette.
 img
  copy: (0 @ 0 extent: mask extent)
  from: 0 @ 0
  in: mask
  rule: RasterOp and.
 ^img
 

-----
Joerg Beekmann
DeepCove Labs
4th floor 595 Howe Street
Vancouver, BC, V6C 2T5
voice +1.604.689.0322
fax   +1.604.689.0311
[hidden email] <blocked::mailto:[hidden email]>


CONFIDENTIALITY NOTICE - This email contains private and confidential
information. If it is not intended for you, delete it and any
attachments.

 

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Image processing in a Headless image - is it possible?

lopemanc
Ever come up with a solution for this?