Drawing lines using imagemagick
Posted: 2012-03-24T05:16:29-07:00
greetings everyone..
We have this application where we accept signatures from users and convert it into transparent png images which we then use for printing purposes. the web interface we are using is the wonderful signature pad by Thomas Bradley http://thomasjbradley.ca/lab/signature-pad/
it captures the movements of the mouse and sends it over to the backend php page as a json array of coordinates. each of these coordinates are then used to generate individual pixels it seems which together make up the final signature.
now coming to our issue, the script works just fine for low resolution images, but at higher resolutions, it creates many semi-transparent pixels in the final image which wont be accepted by the printing firm. so we ended up stripping those pixels, but this in turn distorted the image.
the gd function being used to draw the pixels is
which is the corresponding function in imagemagick?
We have this application where we accept signatures from users and convert it into transparent png images which we then use for printing purposes. the web interface we are using is the wonderful signature pad by Thomas Bradley http://thomasjbradley.ca/lab/signature-pad/
it captures the movements of the mouse and sends it over to the backend php page as a json array of coordinates. each of these coordinates are then used to generate individual pixels it seems which together make up the final signature.
now coming to our issue, the script works just fine for low resolution images, but at higher resolutions, it creates many semi-transparent pixels in the final image which wont be accepted by the printing firm. so we ended up stripping those pixels, but this in turn distorted the image.
the gd function being used to draw the pixels is
Code: Select all
imagefilledpolygon