ActionComponents  04.05.00
Customizable UI and time-saving tools for Android development with Xamarin and Visual Studio.
ActionComponents.ACImage Class Reference

The ActionComponents.ACImage is a static class that adds several helpful utilities for dealing with images as Bitmaps. More...

Static Public Member Functions

static Bitmap FromFile (string filename)
 Loads the image from the given filename and path More...
 
static ACImageInfo ImageInfoFromFile (string filename)
 Queries the given image file and returns information about the file in a ActionComponents.ACImageInfo More...
 
static Bitmap FromFile (string filename, int width, int height)
 Loads the image from the given filename and path resampling it to the requested height/width More...
 
static Bitmap FromFile (string filename, BitmapFactory.Options options)
 Loads the image from the given filename and path with the given options More...
 
static Bitmap FromResource (Android.Content.Res.Resources resources, int resourceID)
 Loads the image from the given resources and resource ID More...
 
static ACImageInfo ImageInfoFromResource (Android.Content.Res.Resources resources, int resourceID)
 Queries the image resource and returns information about it in a ActionComponents.ACImageInfo More...
 
static Bitmap FromResource (Android.Content.Res.Resources resources, int resourceID, int width, int height)
 Loads the image from the given resources and resource ID resampling it to the requested height/width More...
 
static Bitmap FromResource (Android.Content.Res.Resources resources, int resourceID, BitmapFactory.Options options)
 Loads the image from the given resources and resource ID with the given options More...
 
static int CalculateInSampleSize (BitmapFactory.Options options, int reqWidth, int reqHeight)
 Calculates the sampling factor for an image being loaded into memory and down-sampled at the same time More...
 
static int CalculateInSampleSize (ACImageInfo info, int reqWidth, int reqHeight)
 Calculates the sampling factor for an image being loaded into memory and down-sampled at the same time More...
 
static Bitmap RotateImage (Bitmap bitmap, int degrees)
 Rotates the given image Bitmap about it center axis to the given degrees More...
 

Detailed Description

The ActionComponents.ACImage is a static class that adds several helpful utilities for dealing with images as Bitmaps.

The ActionComponents.ACImage attempts to maintain the same calling structure and functionality with the iOS version of the ActionPack to assist in building cross platform mobile applications. Available in ActionPack Business or Enterprise only.

Member Function Documentation

static int ActionComponents.ACImage.CalculateInSampleSize ( BitmapFactory.Options  options,
int  reqWidth,
int  reqHeight 
)
static

Calculates the sampling factor for an image being loaded into memory and down-sampled at the same time

Returns
The in sample size.
Parameters
optionsOptions.
reqWidthReq width.
reqHeightReq height.

Here is the caller graph for this function:

static int ActionComponents.ACImage.CalculateInSampleSize ( ACImageInfo  info,
int  reqWidth,
int  reqHeight 
)
static

Calculates the sampling factor for an image being loaded into memory and down-sampled at the same time

Returns
The in sample size.
Parameters
infoInfo.
reqWidthReq width.
reqHeightReq height.
static Bitmap ActionComponents.ACImage.FromFile ( string  filename)
static

Loads the image from the given filename and path

Returns
The image as a Bitmap or null on error
Parameters
filenameThe full path and filename of the image to load

The resulting bitmap will allocate its pixels such that they can be purged if the system needs to reclaim memory.

Here is the caller graph for this function:

static Bitmap ActionComponents.ACImage.FromFile ( string  filename,
int  width,
int  height 
)
static

Loads the image from the given filename and path resampling it to the requested height/width

Returns
The image as a Bitmap or null on error
Parameters
filenameThe full path and filename of the image to load
widthWidth.
heightHeight.

The resulting bitmap will allocate its pixels such that they can be purged if the system needs to reclaim memory.

Here is the call graph for this function:

static Bitmap ActionComponents.ACImage.FromFile ( string  filename,
BitmapFactory.Options  options 
)
static

Loads the image from the given filename and path with the given options

Returns
The image as a Bitmap or null on error
Parameters
filenameThe full path and filename of the image to load
optionsOptions.
static Bitmap ActionComponents.ACImage.FromResource ( Android.Content.Res.Resources  resources,
int  resourceID 
)
static

Loads the image from the given resources and resource ID

Returns
The image as a Bitmap or null on error
Parameters
resourcesResources.
resourceIDResource ID.

The resulting bitmap will allocate its pixels such that they can be purged if the system needs to reclaim memory.

Here is the caller graph for this function:

static Bitmap ActionComponents.ACImage.FromResource ( Android.Content.Res.Resources  resources,
int  resourceID,
int  width,
int  height 
)
static

Loads the image from the given resources and resource ID resampling it to the requested height/width

Returns
The image as a Bitmap or null on error
Parameters
resourcesResources.
resourceIDResource ID.
widthWidth.
heightHeight.

The resulting bitmap will allocate its pixels such that they can be purged if the system needs to reclaim memory.

Here is the call graph for this function:

static Bitmap ActionComponents.ACImage.FromResource ( Android.Content.Res.Resources  resources,
int  resourceID,
BitmapFactory.Options  options 
)
static

Loads the image from the given resources and resource ID with the given options

Returns
The image as a Bitmap or null on error
Parameters
resourcesResources.
resourceIDResource ID.
optionsOptions.
static ACImageInfo ActionComponents.ACImage.ImageInfoFromFile ( string  filename)
static

Queries the given image file and returns information about the file in a ActionComponents.ACImageInfo

Returns
The info from file.
Parameters
filenameFilename.

This method queries the image file without actually loading it into memory

Here is the caller graph for this function:

static ACImageInfo ActionComponents.ACImage.ImageInfoFromResource ( Android.Content.Res.Resources  resources,
int  resourceID 
)
static

Queries the image resource and returns information about it in a ActionComponents.ACImageInfo

Returns
The info from resource.
Parameters
resourcesResources.
resourceIDResource ID.

This method queries the image resource without actually loading it into memory

Here is the caller graph for this function:

static Bitmap ActionComponents.ACImage.RotateImage ( Bitmap  bitmap,
int  degrees 
)
static

Rotates the given image Bitmap about it center axis to the given degrees

Returns
The image.
Parameters
bitmapBitmap.
degreesDegrees.

Negative degrees rotate counter-clockwise