I want to merge 2 images and that too at specific location of 1st image.
Example:
1st image: x.png
(400 X 400px)
2nd image: y.png
(at 100,100
co-ordinates)
How can i do this using python in google appengine.?
If you can provide some codes for this ... or any reference to this code... will be appreciated.
Thank you, Please let me know for more clarification.
This can be done using the very cut down imaging library which emulates some of the functions of PIL. The function you need is composite
from google.appengine.api import images
xpng = #Load data from x.png here, or read from BlobProperty
ypng = #Load data from y.png here, or read from BlobProperty
composite = images.composite([(xpng, 0, 0, 1.0, images.TOP_LEFT),
(ypng, 100, 100, 1.0, images.TOP_LEFT)], 400, 400)
#composite now holds your new image data, to do what you want with
Try composite
method : see the documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With