Shivito1 Active Member Licensed User Dec 5, 2017 #1 i need to crop screen shot bitmaps continuously. However all the threads I've found use saved images when cropping.
i need to crop screen shot bitmaps continuously. However all the threads I've found use saved images when cropping.
Emme Developer Well-Known Member Licensed User Longtime User Dec 5, 2017 #2 Shivito1 said: i need to crop screen shot bitmaps continuously. However all the threads I've found use saved images when cropping. Click to expand... Which version of b4a have you? In 7.30 (maybe 7.0+, don't remember) there is Bitmap.Crop method Upvote 0
Shivito1 said: i need to crop screen shot bitmaps continuously. However all the threads I've found use saved images when cropping. Click to expand... Which version of b4a have you? In 7.30 (maybe 7.0+, don't remember) there is Bitmap.Crop method
Emme Developer Well-Known Member Licensed User Longtime User Dec 5, 2017 #4 Shivito1 said: I have 6.80 Click to expand... You need so to use a Canvas Upvote 0
Shivito1 Active Member Licensed User Dec 5, 2017 #5 Emme Developer said: Which version of b4a have you? In 7.30 (maybe 7.0+, don't remember) there is Bitmap.Crop method Click to expand... I have 6.80 b4a Upvote 0
Emme Developer said: Which version of b4a have you? In 7.30 (maybe 7.0+, don't remember) there is Bitmap.Crop method Click to expand... I have 6.80 b4a
Emme Developer Well-Known Member Licensed User Longtime User Dec 5, 2017 #6 Try this code and edit the rect to crop image at coordinates that you want https://www.b4x.com/android/forum/threads/draw-round-bitmap.41240/#content Upvote 0
Try this code and edit the rect to crop image at coordinates that you want https://www.b4x.com/android/forum/threads/draw-round-bitmap.41240/#content
Shivito1 Active Member Licensed User Dec 5, 2017 #7 Emme Developer said: Try this code and edit the rect to crop image at coordinates that you want https://www.b4x.com/android/forum/threads/draw-round-bitmap.41240/#content Click to expand... I'll give it a try but it looks like it requires me to load a file saved on my device. Upvote 0
Emme Developer said: Try this code and edit the rect to crop image at coordinates that you want https://www.b4x.com/android/forum/threads/draw-round-bitmap.41240/#content Click to expand... I'll give it a try but it looks like it requires me to load a file saved on my device.
Emme Developer Well-Known Member Licensed User Longtime User Dec 5, 2017 #8 Shivito1 said: I'll give it a try but it looks like it requires me to load a file saved on my device. Click to expand... Are you able to get ScreenShot? You can use it as bitmap. You don't need a file saved, you can have a bitmap in memory, or download it, or other options.. You for sure need a bitmap by the way Upvote 0
Shivito1 said: I'll give it a try but it looks like it requires me to load a file saved on my device. Click to expand... Are you able to get ScreenShot? You can use it as bitmap. You don't need a file saved, you can have a bitmap in memory, or download it, or other options.. You for sure need a bitmap by the way
Shivito1 Active Member Licensed User Dec 5, 2017 #9 maybe this will work. wonder if I can make it a rectangle instead of a circle Upvote 0
Shivito1 Active Member Licensed User Dec 5, 2017 #10 Emme Developer said: Are you able to get ScreenShot? You can use it as bitmap. You don't need a file saved, you can have a bitmap in memory, or download it, or other options.. You for sure need a bitmap by the way Click to expand... Thanks!!! Hopefully I can get it to work. I have to improve my searching. Upvote 0
Emme Developer said: Are you able to get ScreenShot? You can use it as bitmap. You don't need a file saved, you can have a bitmap in memory, or download it, or other options.. You for sure need a bitmap by the way Click to expand... Thanks!!! Hopefully I can get it to work. I have to improve my searching.
Shivito1 Active Member Licensed User Dec 5, 2017 #11 Man I can't catch a break with this. I tried a couple times to get it to store it as a bitmap instead of drawing it. However the method I'm using keeps giving me a void error. How can I get it to store as a bitmap after applying the canvas? Upvote 0
Man I can't catch a break with this. I tried a couple times to get it to store it as a bitmap instead of drawing it. However the method I'm using keeps giving me a void error. How can I get it to store as a bitmap after applying the canvas?
Cableguy Expert Licensed User Longtime User Dec 5, 2017 #12 Write stream... (Or stream out, can't remember) Upvote 0
Shivito1 Active Member Licensed User Dec 5, 2017 #13 Cableguy said: Write stream... (Or stream out, can't remember) Click to expand... I thought that was to save the file to the device. I'll doublecheck Upvote 0
Cableguy said: Write stream... (Or stream out, can't remember) Click to expand... I thought that was to save the file to the device. I'll doublecheck
Cableguy Expert Licensed User Longtime User Dec 5, 2017 #14 I thought that was what you wanted Upvote 0
Shivito1 Active Member Licensed User Dec 5, 2017 #15 Cableguy said: I thought that was what you wanted Click to expand... No because then I would have to read it again so that I can pass it through OCR Upvote 0
Cableguy said: I thought that was what you wanted Click to expand... No because then I would have to read it again so that I can pass it through OCR
Cableguy Expert Licensed User Longtime User Dec 5, 2017 #16 canvas has a method to convert to bitmap, if I recall correctly... But it's been a while since I've used it Upvote 0
canvas has a method to convert to bitmap, if I recall correctly... But it's been a while since I've used it
Shivito1 Active Member Licensed User Dec 6, 2017 #17 the only one that sounds correct is canvas.bitmap however it does not convert it to a bitmap that I can use. All it allows me to do is WriteToStream.... This will create a file on the device and that is not what I need. Upvote 0
the only one that sounds correct is canvas.bitmap however it does not convert it to a bitmap that I can use. All it allows me to do is WriteToStream.... This will create a file on the device and that is not what I need.
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2017 #18 Canvas.Bitmap returns a regular bitmap object. Upvote 0
Shivito1 Active Member Licensed User Dec 6, 2017 #19 So how can I get my canvas creations back to bitmap? Preferably without saving it to the device first Upvote 0
So how can I get my canvas creations back to bitmap? Preferably without saving it to the device first
DonManfred Expert Licensed User Longtime User Dec 6, 2017 #20 Shivito1 said: canvas creations back to bitmap? Click to expand... Code: dim newbm as bitmap = canvas.Bitmap ? Upvote 0
Shivito1 said: canvas creations back to bitmap? Click to expand... Code: dim newbm as bitmap = canvas.Bitmap ?