f0raster0 Well-Known Member Licensed User Longtime User May 19, 2016 #1 I would like to show an Image in ImageView or similar, What do I have to do to be able to zoom in/out the Image with 2 fingers? Thank you all,
I would like to show an Image in ImageView or similar, What do I have to do to be able to zoom in/out the Image with 2 fingers? Thank you all,
Erel B4X founder Staff member Licensed User Longtime User May 19, 2016 #2 The simplest way is with WebView: Code: Copy WebView1.LoadUrl(File.Combine(File.DirAssets, "IMG_0001.PNG".ToLowerCase)) 'ToLowerCase is only required if the image is loaded from the assets folder. Make sure that the ScaleToFit option is checked. Upvote 0
The simplest way is with WebView: Code: Copy WebView1.LoadUrl(File.Combine(File.DirAssets, "IMG_0001.PNG".ToLowerCase)) 'ToLowerCase is only required if the image is loaded from the assets folder. Make sure that the ScaleToFit option is checked.
jazzzzzzz Active Member Licensed User Longtime User Jun 12, 2016 #3 Erel said: The simplest way is with WebView: Code: Copy WebView1.LoadUrl(File.Combine(File.DirAssets, "IMG_0001.PNG".ToLowerCase)) 'ToLowerCase is only required if the image is loaded from the assets folder. Make sure that the ScaleToFit option is checked. Click to expand... How can we show a bitmap in WebView?? Upvote 0
Erel said: The simplest way is with WebView: Code: Copy WebView1.LoadUrl(File.Combine(File.DirAssets, "IMG_0001.PNG".ToLowerCase)) 'ToLowerCase is only required if the image is loaded from the assets folder. Make sure that the ScaleToFit option is checked. Click to expand... How can we show a bitmap in WebView??
Erel B4X founder Staff member Licensed User Longtime User Jun 12, 2016 #4 With the code I posted in post #2. Upvote 0
jazzzzzzz Active Member Licensed User Longtime User Jun 12, 2016 #5 Bitmap is not in my DirAssets, its a bitmap variable in the code (some downloaded data) Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 12, 2016 #6 You will need to write it to a temporary file: Code: Copy Dim out As OutputStream = File.OpenOutput(File.DirTemp, "temp.png", False) bmp.WriteToStream(out, 100, "PNG") out.Close Upvote 0
You will need to write it to a temporary file: Code: Copy Dim out As OutputStream = File.OpenOutput(File.DirTemp, "temp.png", False) bmp.WriteToStream(out, 100, "PNG") out.Close