B4A Library MFLib - common functions, image manipulation, math parser

MaFu

Well-Known Member
Licensed User
Longtime User
If you have your image as file, you can use BitmapToString2(). This function converts the image to string without conversion.
Use BitmapToString2() followed by StringToBitmap2() and the target file is 1:1 the same file as source.
BitmapToString3() also converts a image file, but recompressed it depending on the quality factor (same as BitmapToString())
 

ArminKH

Well-Known Member
My source img format is png
Ok thanks no problem ;-)
 

MaFu

Well-Known Member
Licensed User
Longtime User
In this case the string should be greater than the image on quality=100 (which results in PNG). If you convert the string back to PNG, is the image size similar to the source image size?
Did you have a similar behaviour with other images?
 

ArminKH

Well-Known Member
I dont know i am not on my pc
I test it just for png to string for 5 image and results are same
I will test it and post results
Tnx again 4 your quick response
 

MaFu

Well-Known Member
Licensed User
Longtime User
If the result of FilterBlur() isn't sufficient then repeat the call.
B4X:
Dim MF_Image As MF_Image
Dim bmp As Bitmap = Job.GetBitmap
For i = 1 To 5
    bmp = MF_Image.FilterBlur(bmp)
Next
 

imbault

Well-Known Member
Licensed User
Longtime User
Hi Manfred
Could you add IIF in your functions? or too complicated?

Thanks

Patrick
 

Dave O

Well-Known Member
Licensed User
Longtime User
Your library is the easiest way I've found to convert images to grayscale - 2 simple lines of code and it's done.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…