B4A Library RSImageProcessing Library

awama

Active Member
Licensed User
Longtime User
replace

io.Initialize("io")

to

io.Initialize

Yes, that was it.

And with the fixed library other errors also are away.
You saved my weekend. Many thanks.
Walter
 
Last edited:

Informatix

Expert
Licensed User
Longtime User
replace

io.Initialize("io")

to

io.Initialize

In fact, almost everything is broken. I fixed all bugs. Here is a working demo (the blur effect doesn't do what I expect - blurring - so maybe there's something more to do).

EDIT: I did a few tests with other images and the blur effect did its job well. I'm old and my eyes need bigger images. ;-)
 

Attachments

  • Project.zip
    135.5 KB · Views: 533
Last edited:

vb1992

Well-Known Member
Licensed User
Longtime User
I modified your project and it now
Works well

Especially with this order of effects:

  1. Greyscale
  2. Blur
  3. Invert
  4. Blend
  5. Invert
  6. SuperBlur
  7. MultiBlend
 

Attachments

  • ExampleEffects.zip
    140.4 KB · Views: 635
  • RSImageProcessing.apk
    234.4 KB · Views: 374

danoptic

Member
Licensed User
Longtime User
I m getting an error when compiling yhe project sample

Compiling code. Error
Error compiling program.
Error description: Unknown member: colordodgeblend
Occurred on line: 57
btmpBlend = IO.ColorDodgeBlend(btmpBlur, btmpGrayScale)
Word: colordodgeblend

M i missing a library?
 

pixelpop

Active Member
Licensed User
Longtime User
I have an ImageView that is 320w X 200H. I need to load images into this ImageView while maintaining their aspect ratio. The images are always larger than the ImageView. This is my code, but I am getting an error on the emulator that bitmap size exceeds 32bits.

B4X:
Dim scaleBitmap as Bitmap
Dim rs As RSImageProcessing

imgHeight = lgpic_array(0).Height
imgWidth = lgpic_array(0).Width
rs.Initialize

If imgHeight > imgWidth Then
   imgScaleWidth = rs.getDestination(lgpic_array(0),200)
   scaleBitmap = rs.scaleBitmap(lgpic_array(0), imgScaleWidth, 200)
Else
   imgScaleHeight = rs.getDestination(lgpic_array(0),320)
   scaleBitmap = rs.scaleBitmap(lgpic_array(0), 320, imgScaleHeight)
End If
   
   
imvImage.Initialize("imvImage")
imvImage.Gravity = Gravity.CENTER
imvImage.Bitmap = scaleBitmap

What am I doing wrong here? Also, there is a lot of overhead in this library to just scale a bitmap. Is there a more efficient method I should use instead? Thanks.
 
Last edited:

pixelpop

Active Member
Licensed User
Longtime User
It appears that LoadBitmapSample requires a bitmap that is a file on the device. Note that in my case, the bitmap is strictly in memory. The bitmap is downloaded from a web site and assigned to a bitmap array location:

lgpic_array(0) = Job.GetBitmap

I'd rather not have to write this to storage and then read it back with LoadBitmapSample if I can avoid it.
 

aloof

Member
Licensed User
Longtime User
how would i show a preview of a effect? in imageview

would i...
save the effect to file an then load it in imageview then delete it if not saved?

thanx
 

holographl

Member
Licensed User
Longtime User
Some questions about your library

First thanks for the library it is very helpful.

I have a couple of things I need to figure out maybe you can help.

First how do I set the threshold for the BlackFilter? I would like the user to have a slide or something to adjust it.

Second: Is there a way to crop a polygon from a bitmap and save that as a new image? I know I can do it with a rectangle but cant seem to see how to do it with a polygon.

thanks for you help.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Lomo effect

xverhelstx

Do you know if a combination of these effects could create a Lomo effect which is very popular currently.

Cheers,
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…