crop with gravity
Posted: 2011-07-28T13:17:51-07:00
I reported this issue in a different thread, but I am moving it to its own thread, to ensure the issue gets attention.
A patch which appeared in today's beta allows gravity to be <set>, however <crop> does not implement gravity at this time.
in msl.c at line 2141, the function ParsePageGeometry is called as opposed to ParseGravityGeometry, which causes gravity to be ignored in rendering the image.
Changing line 2141 to :
results in proper handling of gravity.
This fix does will only work for the geometry attribute. Supplying attributes height, width, x and y will result in gravity being ignored.
If <crop> was implemented in this way (to ignore gravity) on purpose, it would be a good idea to implement a gravity attribute to work around this design.
If this can be adopted, that would be great. My project requires a <crop> with gravity support, if this is not implemented, I will not be able to use msl for this project. Project requirements dictate that we can not use modified source code.
Thank you!
I will be toying with msl.c to try to get gravity to work with height, width, x and y. If I come up with a good solution, I will post it here.
A patch which appeared in today's beta allows gravity to be <set>, however <crop> does not implement gravity at this time.
in msl.c at line 2141, the function ParsePageGeometry is called as opposed to ParseGravityGeometry, which causes gravity to be ignored in rendering the image.
Changing line 2141 to :
Code: Select all
flags=ParseGravityGeometry(msl_info->image[n],value,
&geometry,&exception);
This fix does will only work for the geometry attribute. Supplying attributes height, width, x and y will result in gravity being ignored.
If <crop> was implemented in this way (to ignore gravity) on purpose, it would be a good idea to implement a gravity attribute to work around this design.
If this can be adopted, that would be great. My project requires a <crop> with gravity support, if this is not implemented, I will not be able to use msl for this project. Project requirements dictate that we can not use modified source code.
Thank you!
I will be toying with msl.c to try to get gravity to work with height, width, x and y. If I come up with a good solution, I will post it here.