You could always run a resize on the rotated image if you test the image size and it is too big, hopefully it will still be of a decent enough standard after resizing. The latest version of the extension provides a method for getting the filesize/dimensions, and for cropping.
one suggestion:
replace "file://" with "" in target and output in the extension source code, then the user no need to substring any more.
Yes, I keep meaning to do this
Will fix it today !!
[EDIT] now fixed.
Update to version 3.3
handles target and output paths with both full and absolute paths, e.g. file:///storage/...
and /storage/...
.
Update to version 3.6
- added Rounded Corners function. Output must be saved as png to preserve transparency. A setting of
width/2
on a square image will return a circular image. - minor bug fix to the handling of File component full paths (
file://
), which now should work correctly for all extension functions.
Update to version 3.7
- hopefully fixed bugs with interchange between formats
- as a bonus I have added Crop To Circle, this will take an input image of any dimensions and crop to a circle at the centre. This was already possible using the extension (from v3.6) with a bit of work with blocks, but now Crop To Circle simplifies the process.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
Update to version 3.8
- Addition of a text watermark feature, output image saved as PNG.
example blocks:
(in this example the image was 100x100 pixels)
possible to rotate the text watermark or set it's custom font type?
I believe both are possible.
I have the rotate feature working in ImageConvertor, but do not know the method for setting a typeface from a font file in the assets.
These have promise but generate runtime errors:
.setTypeface(Typeface.createFromFile(form.getAssetPath(fontname)));
or
.setTypeface(Typeface.createFromAsset(form.getAssets(),fontname));
https://developer.android.com/reference/android/graphics/Typeface
Is it possible to turn a .Png into a .Jpg
_junko
Yes, that was the very first operation of this extension.
You can convert between png, jpg, and webp.
How would you do so?