Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / Imaging / JpegBitmapDecoder.cs / 1305600 / JpegBitmapDecoder.cs
//------------------------------------------------------------------------------
// Microsoft Avalon
// Copyright (c) Microsoft Corporation, All Rights Reserved
//
// File: JpegBitmapDecoder.cs
//
//-----------------------------------------------------------------------------
using System;
using System.IO;
using System.Collections;
using System.Security;
using System.Security.Permissions;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Reflection;
using Microsoft.Win32.SafeHandles;
using MS.Internal;
using System.Diagnostics;
using System.Windows.Media;
using System.Globalization;
using System.Runtime.InteropServices;
namespace System.Windows.Media.Imaging
{
#region JpegBitmapDecoder
///
/// The built-in Microsoft Jpeg (Bitmap) Decoder.
///
public sealed class JpegBitmapDecoder : BitmapDecoder
{
///
/// Don't allow construction of a decoder with no params
///
private JpegBitmapDecoder()
{
}
///
/// Create a JpegBitmapDecoder given the Uri
///
/// Uri to decode
/// Bitmap Create Options
/// Bitmap Caching Option
///
/// Critical - access critical resource
/// PublicOK - inputs verified or safe
///
[SecurityCritical ]
public JpegBitmapDecoder(
Uri bitmapUri,
BitmapCreateOptions createOptions,
BitmapCacheOption cacheOption
) : base(bitmapUri, createOptions, cacheOption, MILGuidData.GUID_ContainerFormatJpeg)
{
}
///
/// If this decoder cannot handle the bitmap stream, it will throw an exception.
///
/// Stream to decode
/// Bitmap Create Options
/// Bitmap Caching Option
///
/// Critical - access critical resource
/// PublicOK - inputs verified or safe
///
[SecurityCritical ]
public JpegBitmapDecoder(
Stream bitmapStream,
BitmapCreateOptions createOptions,
BitmapCacheOption cacheOption
) : base(bitmapStream, createOptions, cacheOption, MILGuidData.GUID_ContainerFormatJpeg)
{
}
///
/// Internal Constructor
///
///
/// Critical: Uses a SafeFileHandle, which is a SecurityCritical type (in v4).
/// Calls SecurityCritical base class constructor.
///
[SecurityCritical]
internal JpegBitmapDecoder(
SafeMILHandle decoderHandle,
BitmapDecoder decoder,
Uri baseUri,
Uri uri,
Stream stream,
BitmapCreateOptions createOptions,
BitmapCacheOption cacheOption,
bool insertInDecoderCache,
bool originalWritable,
Stream uriStream,
UnmanagedMemoryStream unmanagedMemoryStream,
SafeFileHandle safeFilehandle
) : base(decoderHandle, decoder, baseUri, uri, stream, createOptions, cacheOption, insertInDecoderCache, originalWritable, uriStream, unmanagedMemoryStream, safeFilehandle)
{
}
#region Internal Abstract
/// Need to implement this to derive from the "sealed" object
internal override void SealObject()
{
throw new NotImplementedException();
}
#endregion
}
#endregion
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- sqlser.cs
- OleDbMetaDataFactory.cs
- MethodRental.cs
- RangeValuePattern.cs
- Model3DGroup.cs
- SqlTriggerContext.cs
- BamlBinaryReader.cs
- DirtyTextRange.cs
- UpdatePanelTriggerCollection.cs
- XmlSchemaCollection.cs
- GeneralTransform3DCollection.cs
- DataGridViewComboBoxCell.cs
- KeyConverter.cs
- CqlLexer.cs
- SyntaxCheck.cs
- ReleaseInstanceMode.cs
- AssociationSetEnd.cs
- SystemIcmpV6Statistics.cs
- NativeRightsManagementAPIsStructures.cs
- SettingsPropertyValueCollection.cs
- ConfigurationSection.cs
- Utility.cs
- CodeTypeReferenceCollection.cs
- ComEventsSink.cs
- SafeSecurityHelper.cs
- Font.cs
- CircleHotSpot.cs
- RegexFCD.cs
- ToolstripProfessionalRenderer.cs
- ResourceIDHelper.cs
- Bits.cs
- HashMembershipCondition.cs
- SelectionProcessor.cs
- Point4D.cs
- ColorKeyFrameCollection.cs
- EntityClassGenerator.cs
- EndOfStreamException.cs
- PropertyPathWorker.cs
- Rfc2898DeriveBytes.cs
- ConfigViewGenerator.cs
- ImageCodecInfoPrivate.cs
- RemoteDebugger.cs
- WrapperSecurityCommunicationObject.cs
- TaskScheduler.cs
- HttpCapabilitiesSectionHandler.cs
- DataGridViewDataErrorEventArgs.cs
- ApplicationHost.cs
- CodeEntryPointMethod.cs
- NgenServicingAttributes.cs
- COMException.cs
- EventMappingSettings.cs
- CollectionDataContractAttribute.cs
- MemoryFailPoint.cs
- MissingMethodException.cs
- Logging.cs
- DirectoryInfo.cs
- WinFormsSpinner.cs
- FormsAuthenticationEventArgs.cs
- PngBitmapEncoder.cs
- IList.cs
- DataControlFieldCell.cs
- DecimalSumAggregationOperator.cs
- SecurityCriticalDataForSet.cs
- TrackingStringDictionary.cs
- prompt.cs
- MultipartIdentifier.cs
- XMLUtil.cs
- XPathSelectionIterator.cs
- InputReferenceExpression.cs
- EncryptedXml.cs
- TrimSurroundingWhitespaceAttribute.cs
- _AuthenticationState.cs
- DownloadProgressEventArgs.cs
- PrinterUnitConvert.cs
- ModifyActivitiesPropertyDescriptor.cs
- OleDbWrapper.cs
- WebOperationContext.cs
- DetailsViewRowCollection.cs
- wgx_sdk_version.cs
- RootDesignerSerializerAttribute.cs
- Invariant.cs
- GroupItem.cs
- UrlMappingsModule.cs
- HTMLTextWriter.cs
- ManualResetEvent.cs
- ConsoleKeyInfo.cs
- ColorInterpolationModeValidation.cs
- DecoderReplacementFallback.cs
- ComponentChangedEvent.cs
- ActiveXMessageFormatter.cs
- TextDecorationLocationValidation.cs
- CodeDomDesignerLoader.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- AutoResizedEvent.cs
- Context.cs
- ListBase.cs
- FlowDocumentReader.cs
- HttpSocketManager.cs
- TextRangeSerialization.cs
- DbConnectionPoolCounters.cs