cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: imageop suggestion
Date Tue, 07 Aug 2007 02:01:31 GMT
Grzegorz Kossakowski <> writes:

> pisze:
>> The imageop block is quite useful for image operations, much more so
>> than the imagereader in the core. It would be nice if it could be
>> released.
>> However there seems to be some problems with rotation code.
>> I mostly managed to get lots of black areas, and spurious image
>> fragments in the rotated image.
>> I had a look at the cocde and its not obvious what a rotation should
>> do, which I think is the root cause of the problem. (that is, what
>> should be the bounding box, where should the anchor for rotation be etc)
>> I propose hiding the general rotation operator, and implementing a
>> rotate-at-right-angle operator.
> Can you explain how this operator would work? I don't have much experience with image
processing so I may miss something obvious.

I tried to find a name that would be obvious, I dont know if I
suceeded. Another name might be "order-4-rotate".

right-angle-rotate simply means rotate by 90, 180, or 270 degrees, and
dont accept intermediary values.

The current rotate operator is supposed to be able to do this, but
somehow fails. 

>> This special case is IMHO the most useful type of rotation, its
>> obvious how it should work, and could be more easily implemented and
>> perhaps optimized.
>> I can implement this if the list decides this is a good idea. (I will
>> probably anyway for my own needs). The general rotation operator could
>> be tackledd later, but wouldnt be necessary for release.
> Feel free to submit patch that will include this new operator,
> adjusted sample and test case. I'm very happy that you want to spend
> some time on imageop block and make it ready for a release.

I will try next week, but I will be on a 3g modem, so image
trial-and-terror will be somewhat slow. I already have something
somewhat working, but need to test all the cases.

> -- 
> Grzegorz Kossakowski

Joakim Verona

View raw message