flash.system

# JPEGLoaderContext - AS3

Package | flash.system
Class | public class JPEGLoaderContext
Inheritance | JPEGLoaderContext LoaderContext Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4

The JPEGLoaderContext class includes a property for enabling a deblocking filter when loading a JPEG image. The deblocking filter improves an image's quality at higher compression settings by smoothing neighboring pixels. To apply deblocking when loading a JPEG image, create a JPEGLoaderContext object, and set its `deblockingFilter` property. Then use the JPEGLoaderContext object name as the value of the `context` parameter of the `load()` method of the Loader object used to load the image.

The JPEGLoaderContext class extends the LoaderContext class. Set the `checkPolicyFile` property to `true` if you need programmatic access to the pixels of the loaded image (for example, if you're using the `BitmapData.draw()` method). Setting the `checkPolicyFile` property is not necessary for AIR content running in the application sandbox.

Related API Elements

flash.display.Loader.load()
flash.display.BitmapData.draw()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | allowCodeImport : Boolean Specifies whether you can use a Loader object to import content with executable code, such as a SWF file, into the caller's security sandbox. | LoaderContext
|  | allowLoadBytesCodeExecution : Boolean Legacy property, replaced by allowCodeImport, but still supported for compatibility. | LoaderContext
|  | applicationDomain : ApplicationDomain = null Specifies the application domain to use for the Loader.load() or Loader.loadBytes() method. | LoaderContext
|  | checkPolicyFile : Boolean = false Specifies whether the application should attempt to download a URL policy file from the loaded object's server before beginning to load the object itself. | LoaderContext
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | deblockingFilter : Number = 0.0 Specifies the strength of the deblocking filter. | JPEGLoaderContext
|  | imageDecodingPolicy : String Specifies whether to decode bitmap image data when it is used or when it is loaded. | LoaderContext
|  | parameters : Object An Object containing the parameters to pass to the LoaderInfo object of the content. | LoaderContext
|  | requestedContentParent : DisplayObjectContainer The parent to which the Loader will attempt to add the loaded content. | LoaderContext
|  | securityDomain : SecurityDomain = null Specifies the security domain to use for a Loader.load() operation. | LoaderContext

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | JPEGLoaderContext(deblockingFilter:Number = 0.0, checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null) Creates a new JPEGLoaderContext object with the specified settings. | JPEGLoaderContext
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### deblockingFilter

property

`public var deblockingFilter:Number = 0.0`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4

Specifies the strength of the deblocking filter. A value of 1.0 applies a full strength deblocking filter, a value of 0.0 disables the deblocking filter.

Constructor Detail

### JPEGLoaderContext

()
Constructor

`public function JPEGLoaderContext(deblockingFilter:Number = 0.0, checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null)`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4

Creates a new JPEGLoaderContext object with the specified settings.

Parameters

| `deblockingFilter:Number` (default = `0.0`)`` — Specifies the strength of the deblocking filter. A value of 1.0 applies a full strength deblocking filter, a value of 0.0 disables the deblocking filter.
| `checkPolicyFile:Boolean` (default = `false`)`` — Specifies whether Flash Player should check for the existence of a URL policy file before loading the object. Does not apply for AIR content running in the application sandbox.
| `applicationDomain:ApplicationDomain` (default = `null`)`` — Specifies the ApplicationDomain object to use for a Loader object.
| `securityDomain:SecurityDomain` (default = `null`)`` — Specifies the SecurityDomain object to use for a Loader object.

Related API Elements

flash.system.LoaderContext
flash.display.Loader.load()
flash.display.Loader.loadBytes()
flash.system.ApplicationDomain
flash.system.SecurityDomain

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00