B4J Question image.writetostream using disk - how to avoid it ? - Magma    
Oct 26, 2022.InitializeToBytesArray(0)
image.WriteToStream(out, quality, "JPEG") 'That seems creating... options but... i ve met something that don't want to have, the image.writetostream is using hdd...
link: does not allow data to be re-read. Similarly, when writing to a standard OutputStream, a cache may...
link: some difference at speed...
Well I put that at first line of OliverA Snippet inline Java (image to...
link: WriteToStream will call dispose in the next version. This is however not related to the writing...
B4A Question webview.CaptureBitmap.WriteToStream - help needed - Zeev Goldstein    
Sep 11, 2024hi
i'm trying to save a webview content as image using this
Dim out As OutputStream
out.InitializeToBytesArray(1000)
out = File.OpenOutput(File.DirInternal, "image.jpg",False)
Text_WebView.CaptureBitmap.WriteToStream(out,100,"JPG")
out.Close
with or....IllegalArgumentException: No enum constant android.graphics.Bitmap.CompressFormat.JPG
at java.lang...
link: .Dirinternal, "image.png", False)
Text_WebView.CaptureBitmap.WriteToStream(out, 100...
B4A Question Bitmap WriteToStream - LucaMs    
Jul 5, 2018 depth).
Then I used WriteToStream; if I save in JPEG format, decreasing the quality, it seems to....WriteToStream(OStream, Quality, "PNG")
Dim IStream As InputStream
IStream = File.OpenInput...
link: You have to resample the image with a new density. It's an hard work:(
This function takes...
link: I used the PNG format and WriteToStream to decrease the quality but if works only with jpg (I found...
link: different if I understood that you are trying to generate a smaller base64 string from a bitmap...
B4J Question [Server] GetImage WriteToStream - enrfortin (first post)    
May 16, 2024 = FileToBytes(File.DirAssets,"no_image_available.png")
Dim Inp As InputStream
Inp...)
' Copy image from InputStream to OutputStream
File.Copy2(Inp, out)
' Close....InputStreamToBytes(File.OpenInput(Dir, FileName))
End Sub
Thanks I was able to adapt the code:
Sub...
link: = FileToBytes(File.DirAssets,"no_image_available.png")
Dim Inp As InputStream
Inp...
link: -ocr"),"image.png",False)
ImageView1.GetImage.WriteToStream(out)
out...
B4J Question WebP images and B4J, is it possible to convert jpg to webp ? - Magma    
Mar 23, 2021 will tell - why you didn't just change the quality of jpeg...
image.WriteToStream(out, quality, "JPEG")
but what i want is something like this:
image.WriteToStream(out, quality...Hi there...
last days i was testing webp images and i have to say they are very good ! :)
B4J has a library here... that can help load them as a simple image...
But is it possible to convert bytes...
link: this:
ffmpeg -i file.webp out.png
or
ffmpeg -i file.webp out.jpg
Need the reverse
image.WriteToStream...
B4J Question Image Writetostream in Raspberry Pi 3 - pevguitars    
Mar 29, 2016.png",False)
Bitmap1.WriteToStream(out)
out.Close
Any help greatly appreciated.
Peter V....ImageViewWrapper$ImageWrapper.WriteToStream(ImageViewWrapper.java:177)
at b4j.example.main._mprint...
link: me everything works except image saving by writetostream..
I have looked at page suggested and...
link: Thank you Erel.
I am attempting to find a way to print images from the Pi 3 captured from a canvas...
link: I don't think that you will be able to save the JavaFX image. What do you need it for? Maybe...
B4A Question Show image in Gallery (Android 7.0) - GGSoft    
Sep 27, 2018After searching in the forum, I tried this code:
' The image
Dim bitmap As Bitmap = LoadBitmap(File.DirAssets, "prueba.jpg")
' Copy to ...files/pruebas/prueba.jpg
Dim Out As OutputStream
Dim r As RuntimePermissions
Out = File.OpenOutput(r.GetSafeDirDefaultExternal("pruebas"), "prueba.jpg", False)
bitmap.WriteToStream(Out, 100, "JPEG")
Out.Close
' "Broadcast" image to gallery
Dim Phone As Phone
If Phone.SdkVersion < 19 Then...
B4A Question Take a Picture & Bitmap.WriteToStream combine - Erel (first post)    
Nov 22, 2013Use camEx.SavePictureToFile(Data, dir, filename) from the CameraEx class.
Your code should be based on CameraEx not Camera library directly....
link: the function "Bitmap.WriteToStream" with the code from the tutorial "Take a picture...
B4A Question Image Output (Bitmap.WriteToStream) - yttrium (first post)    
Apr 23, 2013 pixels were cut and some image metadata and encoding information was lost, which is what caused Photoshop to crash.
Thanks Erel!...
link: out.Flush is not really required in this case.
If you do not call out.Close then some of the last b...
link: Try putting
out.flush
out.close
before the end of each case block.
Fixed it, thanks!
So that I ...
link: Try putting
out.flush
out.close
before the end of each case block....
Other B4J v10.0 is available for download! - Erel    
Oct 16, 2023   
(58 reactions) Each iterator works with Java HashMap and other non-standard maps.
Image.WriteToStream disposes resources properly.
IDE shortcut to go to a layout file: 'ide://goto?Layout=MainPage
New...I'm happy to release a new version of B4J.
This update includes a new IDE feature - code snippets. It will take some time for this feature to become effective. I do believe that in the near future we will find it to be a very useful feature.
https://www.b4x.com/basic4android/images...
Page: 1  
2  
3  
4  
5  
6  
7