Android Question bitmap rotate problem

yaniv hanya

Active Member
Licensed User
img1.Bitmap=LoadBitmap(path, f)
works fine
img1.Bitmap=LoadBitmap(path, f).Rotate(90)
give me the next error


eny idea why?
 

yaniv hanya

Active Member
Licensed User
I'm developing on Lenovo Tab 7 with 2 Gigabytes and Android 7.0
The device is special for development. Nothing ran on him except the b4a bridge
And I'm trying to spin a 5 megapixel image
Why is memory running out?
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0

emexes

Expert
Licensed User
And I'm trying to spin a 5 megapixel image
Spin implies animation (cf rotate could also be a one-off rotation). If you are animating, and using B4X UI routines, consider handballing the rotations to the GPU with:



but it'd still be nice to scale that 5 megapixel image to match the screen resolution.
 
Upvote 0

yaniv hanya

Active Member
Licensed User
I used the LoadBitmapResize it works great.
But just for the sake of understanding, is the operation of rotate is so heavy?
Because I never had a problem with just displaying the pictures even with big pictures.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…