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 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 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 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) 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") 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 B4A Question Imageview to stream - Alexander Stolte (first post)    Nov 28, 2023 Dim bm As B4XBitmap = iv.Bitmap
bm.WriteToStream(File.OpenOutput(xui.DefaultFolder, "Image.jpeg", False), 100, "JPEG") 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 Write bitmap to file - davelt99 (first post)    Mar 27, 2015   (1 reaction) I found It!!
Had to store ImageView.Bitmap to a Bitmap first and then write to the outputstream.
Dim b As Bitmap
b = imgPreview.Bitmap
Dim Out As OutputStream
Out = File.OpenOutput(File.DirRootExternal, sPicName, False)
b.WriteToStream(Out, 100, "JPEG")
Out.Close Page: 1   2   3   4   5   6   7   Powered by ColBERT |