Class representing image X-Object. More...
#include "XImage.h"
Inherits System::Object.
Public Member Functions | |
ASPOSE_PDF_SHARED_API bool | get_ContainsTransparency () |
If the image contains transparancy than return true; otherwise, false. More... | |
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Drawing::Image > | get_Grayscaled () |
Gets grayscaled version of image. More... | |
ASPOSE_PDF_SHARED_API Aspose::Pdf::ImageFilterType | get_FilterType () |
Gets image filter type. More... | |
ASPOSE_PDF_SHARED_API int32_t | get_Width () |
Gets width of the image. More... | |
ASPOSE_PDF_SHARED_API int32_t | get_Height () |
Gets height of the image. More... | |
ASPOSE_PDF_SHARED_API System::String | get_Name () |
Gets image name. Please note that if you change name of the image which has references in page contents, document may became incorrect. Please use XImage.Rename method in this case. More... | |
ASPOSE_PDF_SHARED_API void | set_Name (System::String value) |
Sets image name. Please note that if you change name of the image which has references in page contents, document may became incorrect. Please use XImage.Rename method in this case. More... | |
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Metadata > | get_Metadata () |
Metadata of the image. More... | |
ASPOSE_PDF_SHARED_API void | Rename (System::String name) |
Renames image and replaces all references to the image with the new name More... | |
ASPOSE_PDF_SHARED_API void | Save (System::SharedPtr< System::IO::Stream > stream) |
Saves image data into stream as JPEG image. More... | |
ASPOSE_PDF_SHARED_API void | Save (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< System::Drawing::Imaging::ImageFormat > format) |
Saves image into stream with requested format. More... | |
ASPOSE_PDF_SHARED_API void | AddStencilMask (System::SharedPtr< System::IO::Stream > maskStream) |
Adds a stencil mask to the XImage. More... | |
ASPOSE_PDF_SHARED_API void | Save (System::SharedPtr< System::IO::Stream > stream, int32_t resolution) |
Saves image data into stream as JPEG image with specified resolution. More... | |
ASPOSE_PDF_SHARED_API void | Save (System::SharedPtr< System::IO::Stream > stream, System::SharedPtr< System::Drawing::Imaging::ImageFormat > format, int32_t resolution) |
Saves image into stream with requested format with specified resolution. More... | |
ASPOSE_PDF_SHARED_API Aspose::Pdf::ColorType | GetColorType () |
Returns color type of image. More... | |
ASPOSE_PDF_SHARED_API bool | IsTheSameObject (System::SharedPtr< Aspose::Pdf::XImage > image) |
Returns true if both images references to the same object. More... | |
ASPOSE_PDF_SHARED_API System::String | GetNameInCollection () |
Returns name of the image in ints collection. More... | |
ASPOSE_PDF_SHARED_API System::SharedPtr< System::IO::Stream > | ToStream () |
Returns the original image stream. More... | |
Public Member Functions inherited from System::Object | |
ASPOSECPP_SHARED_API | Object () |
Creates object. Initializes all internal data structures. More... | |
virtual ASPOSECPP_SHARED_API | ~Object () |
Destroys object. Frees all internal data structures. More... | |
ASPOSECPP_SHARED_API | Object (Object const &x) |
Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | SharedRefRemovedSafe () |
Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | RemovedSharedRefs (int count) |
Decreases shared reference count by specified value. More... | |
Detail::SmartPtrCounter * | WeakRefAdded () |
Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
void | WeakRefRemoved () |
Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
Detail::SmartPtrCounter * | GetCounter () |
Gets reference counter data structure associated with the object. More... | |
int | SharedCount () const |
Gets current value of shared reference counter. More... | |
ASPOSECPP_SHARED_API void | Lock () |
Implements C# lock() statement locking. Call directly or use LockContext sentry object. More... | |
ASPOSECPP_SHARED_API void | Unlock () |
Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More... | |
virtual ASPOSECPP_SHARED_API bool | Equals (ptr obj) |
Compares objects using C# Object.Equals semantics. More... | |
virtual ASPOSECPP_SHARED_API int32_t | GetHashCode () const |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
virtual ASPOSECPP_SHARED_API String | ToString () const |
Analog of C# Object.ToString() method. Enables converting custom objects to string. More... | |
virtual ASPOSECPP_SHARED_API ptr | MemberwiseClone () const |
Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More... | |
virtual ASPOSECPP_SHARED_API const TypeInfo & | GetType () const |
Gets actual type of object. Analog of C# System.Object.GetType() call. More... | |
virtual ASPOSECPP_SHARED_API bool | Is (const TypeInfo &targetType) const |
Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More... | |
virtual ASPOSECPP_SHARED_API void | SetTemplateWeakPtr (uint32_t argument) |
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More... | |
virtual ASPOSECPP_SHARED_API bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
For internal purposes only. More... | |
template<> | |
bool | Equals (float const &objA, float const &objB) |
Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More... | |
template<> | |
bool | Equals (double const &objA, double const &objB) |
Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More... | |
template<> | |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
Specialization of Object::ReferenceEquals for case of string and nullptr. More... | |
template<> | |
bool | ReferenceEquals (String const &str1, String const &str2) |
Specialization of Object::ReferenceEquals for case of strings. More... | |
Static Public Member Functions | |
static ASPOSE_PDF_SHARED_API Aspose::Pdf::ColorType | DetectColorType (System::SharedPtr< System::Drawing::Bitmap > bmp) |
Returns color type of image. More... | |
Static Public Member Functions inherited from System::Object | |
static bool | ReferenceEquals (ptr const &objA, ptr const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, T const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, std::nullptr_t) |
Reference-compares value type object with nullptr. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares reference type objects in C# style. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares value type objects in C# style. More... | |
static const TypeInfo & | Type () |
Implements C# typeof(System.Object) construct. More... | |
Protected Member Functions | |
System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Images::IPdfImage > | get_PdfImage () |
Gets the IPdfImage. More... | |
bool | get_HasSMask () |
If the image contains smask than return true; otherwise, false. More... | |
System::SharedPtr< Aspose::Pdf::XImageCollection > | get_Parent () const |
System::SharedPtr< System::Drawing::Image > | get_BlackAndWhite () |
Gets black and white version of image. More... | |
System::ArrayPtr< System::String > | get_ColorSpace () |
System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfObject > | get_EngineObject () |
XImage (System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDataStream > image, System::SharedPtr< Aspose::Pdf::XImageCollection > parent) | |
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (XImage, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDataStream > image, System::SharedPtr< Aspose::Pdf::XImageCollection > parent)) | |
void | Delete () |
Deletes image from the parent collection. More... | |
void | Replace (System::SharedPtr< System::IO::Stream > image) |
Replaces image onto stream specified in image . More... | |
XImage (System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDataStream > image) | |
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (XImage, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDataStream > image)) | |
System::SharedPtr< System::Drawing::Bitmap > | GetBitmap () |
System::SharedPtr< System::Drawing::Image > | GetImage () |
void | SaveWithBlending (System::SharedPtr< System::IO::Stream > stream, int32_t resolution) |
System::SharedPtr< System::IO::Stream > | MakeGrayscaleRawBytes () |
void | UpdateMetadata () |
virtual ASPOSE_PDF_SHARED_API | ~XImage () |
Static Protected Member Functions | |
static System::SharedPtr< System::Drawing::Imaging::ImageFormat > | get_DefaultImageFormat () |
Gets default image format. More... | |
static bool | IsImage (System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfPrimitive > primitive) |
Returns true if the primitive is an image. More... | |
static System::SharedPtr< System::Drawing::Bitmap > | MakeGrayscale (System::SharedPtr< System::IO::Stream > original) |
static bool | IsBitmapFilled (System::SharedPtr< System::Drawing::Bitmap > bitmap, uint8_t whiteColorReplace) |
static bool | IsBitmapFilledRgb (System::SharedPtr< System::Drawing::Bitmap > bitmap, uint8_t whiteColorReplace) |
static int32_t | GetRgbDelta (System::Drawing::Color color) |
Grayscale would have a delta of 0. More... | |
Protected Attributes | |
System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDataStream > | EngineImg |
IPdfImage object which decribes image. More... | |
Additional Inherited Members | |
Public Types inherited from System::Object | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
Class representing image X-Object.
|
protected |
|
protected |
|
protectedvirtual |
ASPOSE_PDF_SHARED_API void Aspose::Pdf::XImage::AddStencilMask | ( | System::SharedPtr< System::IO::Stream > | maskStream | ) |
Adds a stencil mask to the XImage.
maskStream | Stencil mask bitmap stream. |
|
protected |
Deletes image from the parent collection.
|
static |
Returns color type of image.
|
protected |
Gets black and white version of image.
|
protected |
ASPOSE_PDF_SHARED_API bool Aspose::Pdf::XImage::get_ContainsTransparency | ( | ) |
If the image contains transparancy than return true; otherwise, false.
|
staticprotected |
Gets default image format.
|
protected |
ASPOSE_PDF_SHARED_API Aspose::Pdf::ImageFilterType Aspose::Pdf::XImage::get_FilterType | ( | ) |
Gets image filter type.
ASPOSE_PDF_SHARED_API System::SharedPtr<System::Drawing::Image> Aspose::Pdf::XImage::get_Grayscaled | ( | ) |
Gets grayscaled version of image.
|
protected |
If the image contains smask than return true; otherwise, false.
ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::XImage::get_Height | ( | ) |
Gets height of the image.
ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Metadata> Aspose::Pdf::XImage::get_Metadata | ( | ) |
Metadata of the image.
ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::XImage::get_Name | ( | ) |
Gets image name. Please note that if you change name of the image which has references in page contents, document may became incorrect. Please use XImage.Rename method in this case.
|
protected |
|
protected |
Gets the IPdfImage.
ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::XImage::get_Width | ( | ) |
Gets width of the image.
|
protected |
ASPOSE_PDF_SHARED_API Aspose::Pdf::ColorType Aspose::Pdf::XImage::GetColorType | ( | ) |
Returns color type of image.
|
protected |
ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::XImage::GetNameInCollection | ( | ) |
Returns name of the image in ints collection.
|
staticprotected |
Grayscale would have a delta of 0.
color | The color for which to calculate the delta. |
|
staticprotected |
|
staticprotected |
|
staticprotected |
Returns true if the primitive is an image.
ASPOSE_PDF_SHARED_API bool Aspose::Pdf::XImage::IsTheSameObject | ( | System::SharedPtr< Aspose::Pdf::XImage > | image | ) |
Returns true if both images references to the same object.
image | Image to be compared with "this" image. |
|
staticprotected |
|
protected |
|
protected |
|
protected |
ASPOSE_PDF_SHARED_API void Aspose::Pdf::XImage::Rename | ( | System::String | name | ) |
Renames image and replaces all references to the image with the new name
name | New image name. |
|
protected |
Replaces image onto stream specified in image .
image | Stream with image data. |
ASPOSE_PDF_SHARED_API void Aspose::Pdf::XImage::Save | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Saves image data into stream as JPEG image.
stream | Stream where image data will be saved. |
ASPOSE_PDF_SHARED_API void Aspose::Pdf::XImage::Save | ( | System::SharedPtr< System::IO::Stream > | stream, |
System::SharedPtr< System::Drawing::Imaging::ImageFormat > | format | ||
) |
Saves image into stream with requested format.
stream | Stream where image will be saved |
format | Format which will be used for image enconding. ImageFormat |
ASPOSE_PDF_SHARED_API void Aspose::Pdf::XImage::Save | ( | System::SharedPtr< System::IO::Stream > | stream, |
int32_t | resolution | ||
) |
Saves image data into stream as JPEG image with specified resolution.
stream | Stream where image data will be saved. |
resolution | Image resolution |
ASPOSE_PDF_SHARED_API void Aspose::Pdf::XImage::Save | ( | System::SharedPtr< System::IO::Stream > | stream, |
System::SharedPtr< System::Drawing::Imaging::ImageFormat > | format, | ||
int32_t | resolution | ||
) |
Saves image into stream with requested format with specified resolution.
stream | Stream where image will be saved |
format | Format which will be used for image enconding. ImageFormat |
resolution | Image resolution |
|
protected |
ASPOSE_PDF_SHARED_API void Aspose::Pdf::XImage::set_Name | ( | System::String | value | ) |
Sets image name. Please note that if you change name of the image which has references in page contents, document may became incorrect. Please use XImage.Rename method in this case.
ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Pdf::XImage::ToStream | ( | ) |
Returns the original image stream.
|
protected |
|
protected |
IPdfImage object which decribes image.