background color of jit.rota


    Feb 09 2006 | 4:42 am
    First of all, my english is not good. But I wish you can understand what I would like to know.
    I am trying to change background color when image is zoomed out in jit.rota. The color is always black, but I need white. How can I change background color?
    I tried to use another white image with jit.qt.movie for background. But this way was not good for performance speed.
    I appreciated it if you could tell me how to do this or any good idea if you have.
    Thanks in advance,

    • Feb 09 2006 | 10:58 am
      At this time, there is no way to set the clear color in jit.rota,
      although we could consider adding this to a future release. For now,
      you'll likely want to use jit.charmap to turn all instances of black
      to white, although this might have repercussions on the image.
      Alternately, you could hack up a solution, by running a parallel
      patch, rotating a black square against a white background. Then, with
      jit.op objects, we can add in a white background. See attached patch
      below.
      jb
    • Feb 09 2006 | 11:35 am
      another method would be to add a small white border & then use
      boundmode 3:
    • Feb 09 2006 | 12:02 pm
      since @boundmode 1 also clears the alpha channel, i like to use
      jit.alphablend on the output of jit.rota like so:
    • Feb 09 2006 | 5:31 pm
      You could also invert your image colors, then run rota, then invert again.
      Black becomes white.
    • Feb 09 2006 | 7:31 pm
      On Feb 8, 2006, at 8:42 PM, hu wrote:
      > I am trying to change background color when image is zoomed out in
      > jit.rota. The color is always black, but I need white. How can I
      > change background color?
      Please see the jit.rota-bgcolor.pat example. It demonstrates exactly
      how to accomplish this with a named output matrix.
      -Joshua
    • Feb 10 2006 | 5:02 am
      Thank you for you comment!!
      I had not had any good solution for this.
      So I try all your proposal and chose best one for my patch.
      Thank you very much!
      hu