Fork me
BeyondAR
Augmented Reality Framework for Android
 All Classes Functions Variables
com.beyondar.android.util.ImageUtils Class Reference

Util class for manipulating images. More...

Static Public Member Functions

static Bitmap resizeImage (Bitmap bitmapOrg, int newWidth, int newHeight)
 Resize the image. More...
 
static Bitmap resizeImage (Bitmap bitmapOrg, float scale)
 Resize the image. More...
 
static Bitmap rotate (Bitmap b, float degrees)
 
static Bitmap LoadImageFromInternet (final String uri) throws Exception
 Download the file from Internet. More...
 
static Bitmap mergeBitmaps (Bitmap bmp1, Bitmap bmp2)
 Merge two bitmas in to one. More...
 
static int linearInterpolate (int A, int B, int l, int L)
 Linear interpolation between two points. More...
 
static void storeView (View view, String path, String fileName) throws IOException
 Save the view in the the storage. More...
 
static void storeView (View view, File path, String fileName) throws IOException
 Save the view in the the storage. More...
 
static Bitmap getBitmapFromView (View view)
 Generate a Bitmap from a view. More...
 

Static Public Attributes

static final int TIME_OUT_CONNECTION = 15000
 

Detailed Description

Util class for manipulating images.

Member Function Documentation

static Bitmap com.beyondar.android.util.ImageUtils.getBitmapFromView ( View  view)
static

Generate a Bitmap from a view.

Parameters
viewThe view to convert to Bitmap
Returns
A bitmap representing the view.

Here is the caller graph for this function:

static int com.beyondar.android.util.ImageUtils.linearInterpolate ( int  A,
int  B,
int  l,
int  L 
)
static

Linear interpolation between two points.

Return interpolated color Y at distance l.

Source: http://tech-algorithm.com/articles/linear-interpolation/

Parameters
AARGB for point A.
BARGB for point B.
lDistance Y from A.
LDistance between A and B.
Returns
Interpolated color Y.
static Bitmap com.beyondar.android.util.ImageUtils.LoadImageFromInternet ( final String  uri) throws Exception
static

Download the file from Internet.

Parameters
uri
Returns
Exceptions
Exception
static Bitmap com.beyondar.android.util.ImageUtils.mergeBitmaps ( Bitmap  bmp1,
Bitmap  bmp2 
)
static

Merge two bitmas in to one.

Parameters
bmp1
bmp2
Returns
static Bitmap com.beyondar.android.util.ImageUtils.resizeImage ( Bitmap  bitmapOrg,
int  newWidth,
int  newHeight 
)
static

Resize the image.

Parameters
bitmapOrgThe original bitmap
newWidthThe new with
newHeightThe new height
Returns
static Bitmap com.beyondar.android.util.ImageUtils.resizeImage ( Bitmap  bitmapOrg,
float  scale 
)
static

Resize the image.

Parameters
bitmapOrgThe original bitmap
scaleScale to resize
Returns
static void com.beyondar.android.util.ImageUtils.storeView ( View  view,
String  path,
String  fileName 
) throws IOException
static

Save the view in the the storage.

This can be used to set a static view to a BeyondarObject. Remember that in order to use this feature you may need to set Manifest.permission#WRITE_EXTERNAL_STORAGE permission in your application manifest.

This method uses PNG compression.

Parameters
viewThe view to be stored.
pathThe path where it will be saved
fileNameThe name of the image
Exceptions
IOException
static void com.beyondar.android.util.ImageUtils.storeView ( View  view,
File  path,
String  fileName 
) throws IOException
static

Save the view in the the storage.

This can be used to set a static view to a BeyondarObject#. Remember that in order to use this feature you may need to set Manifest.permission#WRITE_EXTERNAL_STORAGE permission in your application manifest.

This method uses PNG compression.

Parameters
viewThe view to be stored.
pathThe path where it will be saved
fileNameThe name of the image
Exceptions
IOException

Here is the call graph for this function:


The documentation for this class was generated from the following file: