Dodger on wrote...
| Okay, I have something I need to do and don't quite understand how to do...
|
| Given a set of three points in a bitmap, I want to select the pixels
| under these three points, and then move the three points, and make the
| pixels warp with.
|
| I.e., I want to move a triangle out of an image, allowing for
| distortion, scaling, etc with some form of good interpolation.
|
| It's gotta be in here, right?
|
| Anyone know how to do this?
|
This is a linear distortion, and IM can do this.
In fact I am wanting to create a program that converts 6 pairs of
points (3 pairs before to 3 pairs after) and from this creates a
Affine transformation matrix.
Once you have that matrix, you can just use -affine and -transform
to transform your image as exampled on
IM v6 Examples, Distorting Images, Affine Transforms
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/#affine
There are however a few problems.
* IM's before v 6.2.5 had broken -affine transformations.
This weas discovered by IM examples, and almost completely fixed.
* It isn't completely fixed as yet. Translations are not being handled
correctly, and the re-development was put in hold so that SVG
gradients could be worked on.
* The current program to convert points into a affine matrix has a
bug which has not be resolved. This program was created by Gabe
but I gather he has forgotten about it for the moment.
Affine Mapping script...
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/scripts/affine_mapping.pl
| Please, please someone else actually respond. It seems like a lot of
| the time when I post a question I just get dead silence.
|
Not dead silence, just quite working :-)
| I know, I'm not asking why my install doesn't work or asking someone
| to explicitly tell me how to do one of the main examples, but I also
| don't believe for an instant that there aren't a ton of you out there
| who know how to do this stuff ten times better than me. It's all well
| and good that people share repetitions of the obvious and FAQ-answered
| problems... but it seems far too often that when someone wants to do
| something new, different, or just non-obvious and asks things just end
| in dead silence.
|
The problem with NEW examples, is that someone first has to work out a
GOOD example that explains the problem, find any bugs that weren't found
before this because of a lack of a good working example, and publish it.
This is what IM examples are all about, and contributions are welcome.
Also when I see an answer in the mail list I try to re-create that
example in the appropriate sections of the IM example pages, which is
now starting to look more like a encylopedia than a set of examples.
Often an example is only not completed because it needs to await further
development, or bug fixes in IM. and this is a slow business that can
not be rushed.
In fact more people working on various areas would be a major help.
Even if you learn as you go, help is always welcome.
I myself am writing IM code in a new "-layers" module to allow better
GIF animation controls and handling with IM (with image layer handling
as a bonus). Examples are being written and updated at the same time,
and I hope to make a general announcement of these additions by the end
of March.
ASIDE: the major change is a proper GIF animation optimization, that is
better (on the macro level) than many standard GIF optimization
programs available. Not to mention operations to transform and study
GIF animations to better understand and control them.
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
The difference between men and boys, is the price of their toys!
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users