B4A Library [New Library] ICOSImageView

Hi guys, as I promised, ICOSImageView is here.

It's simple, and with some future.

the zip include: the library and demo

any question or bug please let me know.


G.Salvi
 

Attachments

  • ICOSImageView.zip
    31.1 KB · Views: 508

warwound

Expert
Licensed User
Longtime User
And some auto-generated reference:

Author: Giuseppe Salvi
Version: 1
  • ICOSImageView
    Events:
    • Click
    • LongClick
    Fields:
    • CENTER As ScaleType
    • CENTER_CROP As ScaleType
    • CENTER_INSIDE As ScaleType
    • FIT_CENTER As ScaleType
    • FIT_END As ScaleType
    • FIT_START As ScaleType
    • FIT_XY As ScaleType
    • FlipHorizontal As Int
    • FlipVertical As Int
    • MATRIX As ScaleType
    Methods:
    • AdjustBrightness (bitmap As Bitmap, brightness As Float) As Bitmap
      Adjust Bitmap Brightness
    • AdjustContrast (bitmap As Bitmap, contrast As Float) As Bitmap
      Adjust Bitmap Contrast
    • AdjustContrastAndBrightness (bitmap As Bitmap, contrast As Float, brightness As Float) As Bitmap
      Adjust Bitmap Contrast And Brightness
    • BlurEdge (bitmap As Bitmap) As Bitmap
    • BringToFront
      Change the view's z order in the tree, so it's on top of other views
    • ColorToBlackAndWhite (bitmap As Bitmap) As Bitmap
      Convert Bitmap To Black And White
    • ColorToNegative (bitmap As Bitmap) As Bitmap
      Convert Bitmap To Negative
    • ColorToSepia (bitmap As Bitmap) As Bitmap
      Convert Bitmap To Sepia
    • FileLength (fileNae As String) As String
      Returns Files length.
    • Flip (bitmap As Bitmap, direction As Int) As Bitmap
      Flip Bitmap
    • GuassianBlur (bitmap As Bitmap, radius As Int) As Bitmap
      Fast GuassianBlur
    • Initialize (EventName As String)
      Initialize the object
    • Invalidate2 (l As Int, t As Int, r As Int, b As Int)
      Mark the area defined by the rect (l,t,r,b) as needing to be drawn.
    • Invalidate3 (rect As Rect)
      Mark the area defined by dirty as needing to be drawn.
    • Invalidate4 (drawable As Drawable)
      Invalidates the specified Drawable.
    • IsInitialized As Boolean
    • LoadBitmap (fileName As String) As Bitmap
      load Bitmap from folder
    • RemoveView
      Remove this view.
    • RequestFocus As Boolean
      Call this to try to give focus to a specific view or to one of its descendants.
    • RotateAngle (bitmap As Bitmap, angle As Int) As Bitmap
      Rotate Bitmap to the right or to the left by degree
    • SaveBitmapAsJPG (bitmap As Bitmap, Filename As String, quality As Int)
      Save Bitmap As JPG
    • SaveBitmapAsPNG (bitmap As Bitmap, Filename As String, quality As Int)
      Save Bitmap As PNG
    • SendToBack
      Change the view's z order in the tree, so it's on back of other views
    • invalidate
      Invalidate the whole view.
    Permissions:
    • android.permission.WRITE_EXTERNAL_STORAGE
    Properties:
    • AdjustViewBounds As Boolean [write only]
      Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
    • BackgroundColor As Int [write only]
      Sets the background color for this view.
    • Bottom As Int [read only]
      Get Bottom position of this view relative to its parent.
    • Enabled As Boolean
      Get or Set the enabled state of this view.
    • GetBitmap As Bitmap [read only]
      Get Bitmap
    • GetOriginalHeight As Int [read only]
      Return the Original Height of the image
    • GetOriginalWidth As Int [read only]
      Return the Original Width of the image
    • Height As Int
      Get or Set the height of this view.
    • Id As Object
      Get or Set the identifier for this view.
    • ImageBitmap As Bitmap [write only]
      Sets a Bitmap as the content of this ImageView.
    • ImageDrawable As Drawable [write only]
      Get or Set a drawable as the content of this ImageView.
    • ImageURI As String [write only]
      Sets a drawable as the content of this ImageView.
    • Left As Int
      Get or Set Left position of this view relative to its parent.
    • Right As Int [read only]
      Get Right position of this view relative to its parent.
    • ScaleType As ScaleType
      Get or Set the current scale type in use by this ImageView.
    • Tag As Object
      Get or Set this view's tag.
    • Top As Int
      Get or Set Top position of this view relative to its parent.
    • Version As Double [read only]
      Return the version of this library
    • Visible As Boolean
      Get or Set the visibility status for this view.
    • Width As Int
      Get or Set the width of this view.

My script is a little buggy but i'll try and get it fixed....
[edit]script fixed and reference updated![/edit]

Martin.
 
Last edited:

lonleystar

Well-Known Member
Licensed User
Longtime User
And some auto-generated reference:

  • ICOSImageView
    Events:
    • Click
    • LongClick
    Permissions:
    • android.permission.WRITE_EXTERNAL_STORAGE
    Properties:
    • AdjustViewBounds As
      Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
    • BackgroundColor As
      Sets the background color for this view.
    • Bottom As Int
      Get Bottom position of this view relative to its parent.
    • Enabled As Boolean
      Get or Set the enabled state of this view.
    • GetBitmap As Bitmap
      Get Bitmap
    • GetOriginalHeight As Int
      Return the Original Height of the image
    • GetOriginalWidth As Int
      Return the Original Width of the image
    • Height As Int
      Get or Set the height of this view.
    • Id As Object
      Get or Set the identifier for this view.
    • ImageBitmap As
      Sets a Bitmap as the content of this ImageView.
    • ImageDrawable As
      Get or Set a drawable as the content of this ImageView.
    • ImageURI As
      Sets a drawable as the content of this ImageView.
    • Left As Int
      Get or Set Left position of this view relative to its parent.
    • Right As Int
      Get Right position of this view relative to its parent.
    • ScaleType As ScaleType
      Get or Set the current scale type in use by this ImageView.
    • Tag As Object
      Get or Set this view's tag.
    • Top As Int
      Get or Set Top position of this view relative to its parent.
    • Version As Double
      Return the version of this library
    • Visible As Boolean
      Get or Set the visibility status for this view.
    • Width As Int
      Get or Set the width of this view.
    Methods:
    • AdjustBrightness (bitmap As Bitmap, brightness As Float) As Bitmap
      Adjust Bitmap Brightness
    • AdjustContrast (bitmap As Bitmap, contrast As Float) As Bitmap
      Adjust Bitmap Contrast
    • AdjustContrastAndBrightness (bitmap As Bitmap, contrast As Float, brightness As Float) As Bitmap
      Adjust Bitmap Contrast And Brightness
    • BlurEdge (bitmap As Bitmap) As Bitmap
    • BringToFront
      Change the view's z order in the tree, so it's on top of other views
    • ColorToBlackAndWhite (bitmap As Bitmap) As Bitmap
      Convert Bitmap To Black And White
    • ColorToNegative (bitmap As Bitmap) As Bitmap
      Convert Bitmap To Negative
    • ColorToSepia (bitmap As Bitmap) As Bitmap
      Convert Bitmap To Sepia
    • FileLength (fileNae As String) As String
      Returns Files length.
    • Flip (bitmap As Bitmap, direction As Int) As Bitmap
      Flip Bitmap
    • GuassianBlur (bitmap As Bitmap, radius As Int) As Bitmap
      Fast GuassianBlur
    • Initialize (EventName As String)
      Initialize the object
    • Invalidate2 (l As Int, t As Int, r As Int, b As Int)
      Mark the area defined by the rect (l,t,r,b) as needing to be drawn.
    • Invalidate3 (rect As Rect)
      Mark the area defined by dirty as needing to be drawn.
    • Invalidate4 (drawable As Drawable)
      Invalidates the specified Drawable.
    • IsInitialized As Boolean
    • LoadBitmap (fileName As String) As Bitmap
      load Bitmap from folder
    • RemoveView
      Remove this view.
    • RequestFocus As Boolean
      Call this to try to give focus to a specific view or to one of its descendants.
    • RotateAngle (bitmap As Bitmap, angle As Int) As Bitmap
      Rotate Bitmap to the right or to the left by degree
    • SaveBitmapAsJPG (bitmap As Bitmap, Filename As String, quality As Int)
      Save Bitmap As JPG
    • SaveBitmapAsPNG (bitmap As Bitmap, Filename As String, quality As Int)
      Save Bitmap As PNG
    • SendToBack
      Change the view's z order in the tree, so it's on back of other views
    • invalidate
      Invalidate the whole view.

My script is a little buggy but i'll try and get it fixed....

Martin.
Hi warwound this is fantastic i needed it thx so much


best regards

G.Salvi
 

susu

Well-Known Member
Licensed User
Longtime User
Your new library works fast! Thank you so much.
Ps: Your example code missed a picture to load, it cause error when click "Load Images" menu.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Your new library works fast! Thank you so much.
Ps: Your example code missed a picture to load, it cause error when click "Load Images" menu.
hi susu thx to you to choose the library please any idea to make it more fast and more good the picture u have to use your one i just use some picture that i have in my tab

best regard

G.Salvi
 

susu

Well-Known Member
Licensed User
Longtime User
Hi Salvi,
Could you please add some "filter" such as Mosaic, Color Halftone, Facet...? It will be extremely useful :D
 

johnB

Active Member
Licensed User
Longtime User
Hi
This is really confusing, there seem to be two posts that relate to the same project. In the other post there are 2 .zip files with different version numbers. WHY do you need both or is one obsolete???

Anyway I've loaded down all the zip files I can't find the library for "ICOSImageAnimator" which it says is missing - see screenshot ImageAminator.jpg ImageAminator.jpg
 
Top