B4A Library BitmapExtended Library

Hey,

Let's give Basic4Android a boost with a new library: BitmapExtended.
With BitmapExtended, you can do a lot more with your bitmaps:

- Resizing, Scaling, Skewing and translating.
- compressing
- createScaledbitmap
- erasing colours
- get density
- change pixels
- Different ways to create bitmaps
- and a lot more!

Everything is explained in the library.
A sample is delivered.

Cheerz,

Tomas
 

Attachments

  • BitmapExtended1.00.zip
    281.2 KB · Views: 3,584

Jim

Member
Licensed User
Longtime User
Has anyone used this lib? Without downloading, I'm curious to know what other ways to create bitmaps it provides.
 

derez

Expert
Licensed User
Longtime User
Thank you Tomas for this contribution, I'm going to try it on some apps, seems promising :)
 

derez

Expert
Licensed User
Longtime User
I guess I miss something here:
When I use createbitmap, the object is a bitmap, how can I get its width and height ?
The creating methods all oprate on bitmaps. I would like to have one that create a bitmap out of part of abitmap file directly, without having to load it first to a bitmap (like in jpeg library, which is slow).
 

XverhelstX

Well-Known Member
Licensed User
Longtime User
mhmm, what do you exactly mean?
I thought I did it always on the correct way.
By doing the following in Eclipse:

1) File -> Export
2) Jar File
3) At the left screen I cross the box next to my project name and at the right side .project and .classpath is automatically checked.
4) I save it to *filepath*/$libraryname*.jar

and I press on Finish.

@Derez. Isn't getHeight and getWidth included?
I should have extracted most of the information here:
Bitmap | Android Developers

Tomas
 

ozgureffe

Member
Licensed User
Longtime User
Hi, and thank you for this library..
I wonder if this library will help us to work with large sized images? Will it be possible to load some part of any image file without loading all bitmap data and touching the Memory Limits?

And there is no explanatory samples with this library. Will you add any sample similar with Agraham's JPEG lib?
 
Last edited:

derez

Expert
Licensed User
Longtime User
Isn't getHeight and getWidth included?

getwidth(bitmap) returns the width of the argument bitmap. I want to get the width of the bitmap that was created using createbitmap#, and it doesn't make sense to have to use bme.getwidth(bme) instead of bme.width. this property should be inherited from the simple bitmap.

Thanks.
 

agraham

Expert
Licensed User
Longtime User
bme.getwidth(bme) instead of bme.width
They are the same. This library is very simplistic in that it doesn't extend Bitmap nor does it own and manipulate an internal bitmap, it merely operates on whatever Bitmaps are passed to it so you don't need multiple BitmapExtended objects as they do not represent individual bitmaps. One instance is all you need in an activity.

There really is no point to having getWidth and getHeight in the library as all it does is return the width and height of the Bitmap passed to it which is a bit of a no-operation really. This library would have been better written to extend the normal Bitmap object or recreate it entirely as a proper Basic4android object.
 

mkvidyashankar

Active Member
Licensed User
Longtime User
In the sample there is nothing about the Library except initialization. If it has more sample codes it would be much useful to use this library. Dont mistake me this is only suggestion. I am struggling to get it implemented in my app.
 

RadCoder

Member
Licensed User
Longtime User
so far so good

rotatebitmap is a lifesaver, had artefacts with canvas drawrotatedbitmap. Burned hours couldn't fix... tried your lib first go boom. You the man...
 

RadCoder

Member
Licensed User
Longtime User
Bug found with RotateBitmap

using rotate bitmap, the output bitmap always varies in size based on the degree of the rotation. For example if a bitmap is 50x50 and you apply rotatebitmap, the resulting rotated bitmap might be 53x53 depending on the degree applied. Could someone confirm my findings. If possible I could review the java source and correct

Thanks again XverhelstX for the lib
 

frapel

Active Member
Licensed User
Longtime User
I don't understand permissions required...

I think this lib is very useful and powerful and I tried to use it in a project of mines but...

...I don't understand why it adds in the manifest the following permissions requirement:

android.permission.BIND_WALLPAPER
android.permission.SET_WALLPAPER


Really I can't find/imagine any primitive (there is no wallpapers management) in the lib needing those... :sign0163:
 

frapel

Active Member
Licensed User
Longtime User
I think this lib is very useful and powerful and I tried to use it in a project of mines but...

...I don't understand why it adds in the manifest the following permissions requirement:

android.permission.BIND_WALLPAPER
android.permission.SET_WALLPAPER


Really I can't find/imagine any primitive (there is no wallpapers management) in the lib needing those... :sign0163:

:sign0163:
 
Top