B4A Question Better photo compression - agraham (first post)    Aug 18, 2022   (1 reaction) Your code above seems invalid as it seems to have "&" instead of "," characters. Android supports WebP from API 14 and as B4A converts strings to enums you could try
Bitmap.WriteToStream(Out, FileSize, "WEBP")
This writes a lossles WebP image if Filesize is 100 or a lossy one if less than 100
Or B4A Library [B4X] [XUI] Cross platform & native UI library - Erel    Mar 01, 2021   (68 reactions) - The B4J library uses imgscalr open source code for the bitmap manipulation. It is superior to ImageView resize algorithm. - Some of the new features that are not available in the core libraries and can be used without relation to the cross platform features: B4XView.Snapshot (new in B4A and B4i) B4A Question Bitmap WriteToStream - LucaMs (first post)    Jul 05, 2018   (1 reaction) but what I need is to obtain a new bitmap with the same width & height of the original one but which needs less memory. B4A Question WriteToStream quality - Blueforcer    Aug 17, 2023 Im generating 8x8 B4Xbitmaps with BitmapCreator.
and save it as jpg and a quality of 100
Dim b As B4XBitmap = BitMapList.Get(0)
b.WriteToStream(File.OpenOutput(xui.DefaultFolder, name, False), 100, "JPEG")
While this look very good on iOS (Right) , it look worse on Android (Left):
It looks like th B4A Question Add thumbnail with WriteToStream method - Ivan Aldaz    May 17, 2017 DrawCircle(100dip, 100dip, 40dip, Colors.Red, False, 10dip)
'Show modified picture
iv.Initialize("iv")
iv.Bitmap=canvas1.Bitmap
iv.Gravity = Gravity.FILL
Activity.AddView(iv,0,0,100%x, 100%y)
'Save picture
Dim Out As OutputStream
Out = File.OpenOutput(File.DirRootExternal B4J Question B4XBitMap Rotate and Save - mmieher (first post)    Jul 25, 2022   (2 reactions) ' get it out of the panel, rotate, redisplay, save
Dim xBitmap As B4XBitmap = B4XImageView1.Bitmap
xBitmap = xBitmap.Rotate(90)
B4XImageView1.Bitmap = xBitmap
xBitmap.WriteToStream(File.OpenOutput(FileDir, "xbmRotated.png", False), 100, "PNG") French xResizeAndCrop1 on Raspberry - klaus (first post)    Feb 24, 2024 I have never used a Raspberry. The WriteToStream method is a B4XBitmap method. I am afraid that only Erel could help with this problem. The LoadImage method loads the image as it is, it does not add any corner radii. Are you speaking of the display of the original image or the cropped image. If it B4i Question pictures is rotated withouth reason - omarruben (first post)    Feb 08, 2022 shows normal no rotation... looks like using Bitmap1.WriteToStream(out, 100, "PNG") is rotated B4A Question Imageview.bitmap 2 Blob and vice versa - mangojack (first post)    Aug 12, 2020   (11 reactions) from an old project ...
'get ImageView bitmap and write to database
Dim bmp As Bitmap = imvImage.Bitmap
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
bmp.WriteToStream(OutputStream1, 90, "JPEG")
Dim Buffer() As Byte = OutputStream1.ToBytesArray
B4A Question output stream multiple - Sofian    Mar 07, 2021 Hi, I want to ask about WritetoStream multiple imageview. I have 2 image on 2 imageview and 2 sub for stream to file Sub loadktp(namafl As String) Dim kt As Bitmap kt.Initialize(File.DirAssets,"back2.jpg") kt = imgKTP.Bitmap Dim out As OutputStream out = File.OpenOutput(LokasiIm Page: 1   2   3   4   5   6   7   Powered by ColBERT |