Souphead wrote:
30,000 times? Can you explain why it's not 40,000 times. So if i had a alpha channel I would have to start with 100,100,1,4 before the fill command?
Yes exactly, when you write 100,100,1,3, it means you are creating a new image with 3 channels (which probably means a 'RGB color image' in your case).
If you want an alpha channel, then you need to define a 4-channels image instead (so, 100,100,1,4).
Quote:
As to what I'm doing, I'm looking at converting something from MATHMAP which works at the pixel level. Since I'm looking to move pixels here rather than work with the channels of the pixels, the math I need t do will be exactly the same for each pixel channel and will take four times longer than it really needs.
If you just want to do some warping operations, it could be easier to define first a warping field (a 2-channel image in your case) that says for each pixel (x,y) of your image from where the value must be taken. Then use the command '-warp' afterwards. Something like :
gmic image.jpg 100%,100%,1,2,"if(c==0,x+100,y+20*cos(x/10))" -warp[0] [1]
Quote:
I suppose I can still continue though I now have some concerns how long my process will take. I can certainly see some benefits of working at the pixel channel level though I can also so some benefits of being able to work at the pixel level too.
Any other hints at how you intend to extend the math evaluator would be nice if you are willing to talk about it now. The recent addition of the init() function implies to me that you want to take this at least somewhat in a MATHMAP like direction.
Souphead
I don't really know how the Mathmap expressions are working, so I can't tell much about the differences or similarities
