.. index:: pair: class; EE::Graphics::Image .. _doxid-class_e_e_1_1_graphics_1_1_image: class EE::Graphics::Image ========================= .. toctree:: :hidden: enum_EE_Graphics_Image_PixelFormat.rst enum_EE_Graphics_Image_ResamplerFilter.rst enum_EE_Graphics_Image_SaveType.rst class_EE_Graphics_Image_FormatConfiguration.rst Overview ~~~~~~~~ A simple image class to manipulate them. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class Image { public: // enums enum :ref:`PixelFormat`; enum :ref:`ResamplerFilter`; enum :ref:`SaveType`; // classes class :ref:`FormatConfiguration`; // construction :target:`Image`(); :ref:`Image`(Graphics::Image* image); :ref:`Image`(:ref:`Uint8`* data, const unsigned int& width, const unsigned int& height, const unsigned int& channels); :ref:`Image`(const :ref:`Uint8`* data, const unsigned int& width, const unsigned int& height, const unsigned int& channels); :ref:`Image`(const :ref:`Uint32`& width, const :ref:`Uint32`& height, const :ref:`Uint32`& channels, const :ref:`Color`& DefaultColor = :ref:`Color`(0, 0, 0, 0), const bool& initWithDefaultColor = true); :ref:`Image`(std::string Path, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); :ref:`Image`(const :ref:`Uint8`* imageData, const unsigned int& imageDataSize, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); :ref:`Image`(:ref:`Pack`* Pack, std::string FilePackPath, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); :ref:`Image`(:ref:`IOStream`& stream, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); virtual :target:`~Image`(); // methods static std::string :ref:`saveTypeToExtension`(const :ref:`Int32`& Format); static :ref:`SaveType` :ref:`extensionToSaveType`(const std::string& Extension); static :ref:`PixelFormat` :ref:`channelsToPixelFormat`(const :ref:`Uint32`& channels); static bool :ref:`getInfo`(const std::string& path, int* width, int* height, int* channels, const :ref:`FormatConfiguration`& imageFormatConfiguration = :ref:`FormatConfiguration`()); static bool :ref:`getInfoFromMemory`(const unsigned char* data, const size_t& dataSize, int* width, int* height, int* channels, const :ref:`FormatConfiguration`& imageFormatConfiguration = :ref:`FormatConfiguration`()); static bool :ref:`isImage`(const std::string& path); static bool :ref:`isImageExtension`(const std::string& path); static std::string :ref:`getLastFailureReason`(); static Image* :target:`New`(); static Image* :target:`New`(Graphics::Image* image); static Image* :target:`New`(:ref:`Uint8`* data, const unsigned int& width, const unsigned int& height, const unsigned int& channels); static Image* :target:`New`(const :ref:`Uint8`* data, const unsigned int& width, const unsigned int& height, const unsigned int& channels); static Image* :target:`New`(const :ref:`Uint32`& width, const :ref:`Uint32`& height, const :ref:`Uint32`& channels, const :ref:`Color`& DefaultColor = :ref:`Color`(0, 0, 0, 0), const bool& initWithDefaultColor = true); static Image* :target:`New`(std::string Path, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); static Image* :target:`New`(const :ref:`Uint8`* imageData, const unsigned int& imageDataSize, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); static Image* :target:`New`(:ref:`Pack`* Pack, std::string FilePackPath, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); static Image* :target:`New`(:ref:`IOStream`& stream, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()); void :ref:`create`(const :ref:`Uint32`& width, const :ref:`Uint32`& height, const :ref:`Uint32`& channels, const :ref:`Color`& DefaultColor = :ref:`Color`(0, 0, 0, 0), const bool& initWithDefaultColor = true); virtual :ref:`Color` :ref:`getPixel`(const unsigned int& x, const unsigned int& y); virtual void :ref:`setPixel`(const unsigned int& x, const unsigned int& y, const :ref:`Color`& Color); virtual void :ref:`setPixels`(const :ref:`Uint8`* data); virtual const :ref:`Uint8`* :ref:`getPixelsPtr`(); :ref:`Uint8`* :ref:`getPixels`() const; void :ref:`setWidth`(const unsigned int& width); unsigned int :ref:`getWidth`() const; void :ref:`setHeight`(const unsigned int& height); unsigned int :ref:`getHeight`() const; unsigned int :ref:`getChannels`() const; void :ref:`setChannels`(const unsigned int& setChannels); void :ref:`clearCache`(); unsigned int :ref:`getMemSize`() const; :ref:`Sizei` :ref:`getSize`(); virtual bool :ref:`saveToFile`(const std::string& filepath, const :ref:`SaveType`& Format); virtual void :ref:`createMaskFromColor`(const :ref:`Color`& ColorKey, :ref:`Uint8` Alpha); void :ref:`createMaskFromColor`(const :ref:`RGB`& ColorKey, :ref:`Uint8` Alpha); virtual void :ref:`replaceColor`(const :ref:`Color`& ColorKey, const :ref:`Color`& NewColor); virtual void :ref:`fillWithColor`(const :ref:`Color`& Color); virtual void :ref:`copyImage`(Graphics::Image* image, const :ref:`Uint32`& x = 0, const :ref:`Uint32`& y = 0); virtual void :ref:`scale`(const :ref:`Float`& scale, :ref:`ResamplerFilter` filter = ResamplerFilter::RESAMPLER_LANCZOS4); virtual void :ref:`resize`(const :ref:`Uint32`& newWidth, const :ref:`Uint32`& newHeight, :ref:`ResamplerFilter` filter = ResamplerFilter::RESAMPLER_LANCZOS4); virtual void :ref:`flip`(); Graphics::Image* :ref:`thumbnail`(const :ref:`Uint32`& maxWidth, const :ref:`Uint32`& maxHeight, :ref:`ResamplerFilter` filter = ResamplerFilter::RESAMPLER_LANCZOS4); Graphics::Image* :ref:`crop`(:ref:`Rect` rect); void :ref:`avoidFreeImage`(const bool& AvoidFree); void :ref:`blit`(Graphics::Image* image, const :ref:`Uint32`& x = 0, const :ref:`Uint32`& y = 0); Graphics::Image* :ref:`copy`(); Graphics::Image& :ref:`operator=`(const Image& right); void :ref:`setImageFormatConfiguration`(const :ref:`FormatConfiguration`& imageFormatConfiguration); const :ref:`FormatConfiguration`& :ref:`getImageFormatConfiguration`() const; }; .. _details-class_e_e_1_1_graphics_1_1_image: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ A simple image class to manipulate them. Construction ------------ .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1ae7aa8d0c673b5ac5ae5dbee07e2d8d2e: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(Graphics::Image* image) Copy a image data to create the new image .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1a757d88cbd3306d20940be08f2ddd218f: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(:ref:`Uint8`* data, const unsigned int& width, const unsigned int& height, const unsigned int& channels) Use an existing image ( and appropriates the data passed ) .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1adc3f31bcdd9111585670ff2cf5281a9f: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(const :ref:`Uint8`* data, const unsigned int& width, const unsigned int& height, const unsigned int& channels) Copy a image data to create the image .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1a15515a687713a9383ff080396d77818b: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(const :ref:`Uint32`& width, const :ref:`Uint32`& height, const :ref:`Uint32`& channels, const :ref:`Color`& DefaultColor = :ref:`Color`(0, 0, 0, 0), const bool& initWithDefaultColor = true) Create an empty image .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1ad12bc8694714c019e79144d1af991a64: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(std::string Path, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()) Load an image from path .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Path - The path to the file. * - forceChannels - Number of channels to use for the image, default 0 means that it use the default image channels. * - formatConfiguration - The specific image format configuration to use when decoding the image. .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1a01d34588491cf23ee6c33fd375488680: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(const :ref:`Uint8`* imageData, const unsigned int& imageDataSize, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()) Load a compressed image from memory .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - imageData - The image data * - imageDataSize - The image size * - forceChannels - Number of channels to use for the image, default 0 means that it use the default image channels. * - formatConfiguration - The specific image format configuration to use when decoding the image. .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1a44af0b8d5e243c3c2f71b922655670a2: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(:ref:`Pack`* Pack, std::string FilePackPath, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()) Load an image from pack .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Pack - The pack file to use to load the image. * - FilePackPath - The path of the file inside the pack file. * - forceChannels - Number of channels to use for the image, default 0 means that it use the default image channels. * - formatConfiguration - The specific image format configuration to use when decoding the image. .. index:: pair: function; Image .. _doxid-class_e_e_1_1_graphics_1_1_image_1a00dbd3d62ef121a50a4e3252bf65bb4a: .. ref-code-block:: cpp :class: doxyrest-title-code-block Image(:ref:`IOStream`& stream, const unsigned int& forceChannels = 0, const :ref:`FormatConfiguration`& formatConfiguration = :ref:`FormatConfiguration`()) Load an image from stream .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - stream - The stream to read the image * - forceChannels - Number of channels to use for the image, default 0 means that it use the default image channels. * - formatConfiguration - The specific image format configuration to use when decoding the image. Methods ------- .. index:: pair: function; saveTypeToExtension .. _doxid-class_e_e_1_1_graphics_1_1_image_1aaa4b57895da6e6109c0a52226dd592d5: .. ref-code-block:: cpp :class: doxyrest-title-code-block static std::string saveTypeToExtension(const :ref:`Int32`& Format) .. rubric:: Returns: The File Extension of a Save Type .. index:: pair: function; extensionToSaveType .. _doxid-class_e_e_1_1_graphics_1_1_image_1ab20efbab322b85ba35fddb40992df316: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`SaveType` extensionToSaveType(const std::string& Extension) .. rubric:: Returns: The save type from a given extension ( example: "png" => SaveType::SAVE_TYPE_PNG ) .. index:: pair: function; channelsToPixelFormat .. _doxid-class_e_e_1_1_graphics_1_1_image_1a139b1b9902fd0e7d9dc507955cd0ca27: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`PixelFormat` channelsToPixelFormat(const :ref:`Uint32`& channels) .. rubric:: Returns: Convert the number of channels to a pixel format .. index:: pair: function; getInfo .. _doxid-class_e_e_1_1_graphics_1_1_image_1a62b3bc820311ff5d949c6e9c7e19e7be: .. ref-code-block:: cpp :class: doxyrest-title-code-block static bool getInfo(const std::string& path, int* width, int* height, int* channels, const :ref:`FormatConfiguration`& imageFormatConfiguration = :ref:`FormatConfiguration`()) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - path - the image path * - width - the var to store the image width * - height - the var to store the image height * - channels - the var to store the image channels count * - imageFormatConfiguration - The specific image format configuration to use when decoding the image. .. rubric:: Returns: True if success to get the info. .. index:: pair: function; getInfoFromMemory .. _doxid-class_e_e_1_1_graphics_1_1_image_1a1ab96e78810e79706a187ddda4efd3a3: .. ref-code-block:: cpp :class: doxyrest-title-code-block static bool getInfoFromMemory(const unsigned char* data, const size_t& dataSize, int* width, int* height, int* channels, const :ref:`FormatConfiguration`& imageFormatConfiguration = :ref:`FormatConfiguration`()) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - data - the pointer containing the image raw data * - dataSize - the point data size * - width - the var to store the image width * - height - the var to store the image height * - channels - the var to store the image channels count * - imageFormatConfiguration - The specific image format configuration to use when decoding the image. .. rubric:: Returns: True if success to get the info. .. index:: pair: function; isImage .. _doxid-class_e_e_1_1_graphics_1_1_image_1a146a497b3a1e7e9c2cb11ee6e5ff8c63: .. ref-code-block:: cpp :class: doxyrest-title-code-block static bool isImage(const std::string& path) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - path - the image path .. rubric:: Returns: True if the file is a valid image ( reads the file header to know if the file is an image file format supported ) .. index:: pair: function; isImageExtension .. _doxid-class_e_e_1_1_graphics_1_1_image_1a7bcc7c682480c8db6c9fbb733fa017ca: .. ref-code-block:: cpp :class: doxyrest-title-code-block static bool isImageExtension(const std::string& path) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - path - the image path or file name .. rubric:: Returns: If the path or file name has a supported image file extension .. index:: pair: function; getLastFailureReason .. _doxid-class_e_e_1_1_graphics_1_1_image_1a4622d91f96aec6716389705378e2a40f: .. ref-code-block:: cpp :class: doxyrest-title-code-block static std::string getLastFailureReason() .. rubric:: Returns: The last failure image loading/info reason .. index:: pair: function; create .. _doxid-class_e_e_1_1_graphics_1_1_image_1ae6fe1771e8ff3956064a9a15a0643b3b: .. ref-code-block:: cpp :class: doxyrest-title-code-block void create(const :ref:`Uint32`& width, const :ref:`Uint32`& height, const :ref:`Uint32`& channels, const :ref:`Color`& DefaultColor = :ref:`Color`(0, 0, 0, 0), const bool& initWithDefaultColor = true) Create an empty image data .. index:: pair: function; getPixel .. _doxid-class_e_e_1_1_graphics_1_1_image_1af6c03f417e08770ada60a5604a3bcba9: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Color` getPixel(const unsigned int& x, const unsigned int& y) Return the pixel color from the image. You must have a copy of the image on local memory. For that you need to Lock the image first. .. index:: pair: function; setPixel .. _doxid-class_e_e_1_1_graphics_1_1_image_1aed358a71ec3d13c71146d3be0a34e55e: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setPixel(const unsigned int& x, const unsigned int& y, const :ref:`Color`& Color) Set the pixel color to the image. You must have a copy of the image on local memory. For that you need to Lock the image first. .. index:: pair: function; setPixels .. _doxid-class_e_e_1_1_graphics_1_1_image_1ae6d608930f89228390ea3ee0829e18a2: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void setPixels(const :ref:`Uint8`* data) Assign a new array of pixels to the image in local memory ( it has to be exactly of the same size of the image ) .. index:: pair: function; getPixelsPtr .. _doxid-class_e_e_1_1_graphics_1_1_image_1ac5ddf8a7443c951597e6df8a12edf325: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual const :ref:`Uint8`* getPixelsPtr() .. rubric:: Returns: A pointer to the first pixel of the image. .. index:: pair: function; getPixels .. _doxid-class_e_e_1_1_graphics_1_1_image_1a7d08bdea8c7ea13337c59680275825ff: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Uint8`* getPixels() const Return the pointer to the array containing the image .. index:: pair: function; setWidth .. _doxid-class_e_e_1_1_graphics_1_1_image_1a14df49ae402b265fcb76ecf380fd4c22: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setWidth(const unsigned int& width) Set the image Width .. index:: pair: function; getWidth .. _doxid-class_e_e_1_1_graphics_1_1_image_1ab7e6cf8fbf57652b144df6bd7ff6ae05: .. ref-code-block:: cpp :class: doxyrest-title-code-block unsigned int getWidth() const .. rubric:: Returns: The image Width .. index:: pair: function; setHeight .. _doxid-class_e_e_1_1_graphics_1_1_image_1acba52d22ccbf91db4bff0042560e6ee1: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setHeight(const unsigned int& height) Set the image Height .. index:: pair: function; getHeight .. _doxid-class_e_e_1_1_graphics_1_1_image_1a341a093a4d91c3879dab4eb563ac1cab: .. ref-code-block:: cpp :class: doxyrest-title-code-block unsigned int getHeight() const .. rubric:: Returns: The image Height .. index:: pair: function; getChannels .. _doxid-class_e_e_1_1_graphics_1_1_image_1a5346185256ef1378374b92ec2f3c1bfd: .. ref-code-block:: cpp :class: doxyrest-title-code-block unsigned int getChannels() const .. rubric:: Returns: The number of channels used by the image .. index:: pair: function; setChannels .. _doxid-class_e_e_1_1_graphics_1_1_image_1a53df2e1e42ab8dbce32170256dc9f7d7: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setChannels(const unsigned int& setChannels) Set the number of channels of the image .. index:: pair: function; clearCache .. _doxid-class_e_e_1_1_graphics_1_1_image_1a82d0b446ff54b84091a813c9297f7d87: .. ref-code-block:: cpp :class: doxyrest-title-code-block void clearCache() Clears the current image cache if exists .. index:: pair: function; getMemSize .. _doxid-class_e_e_1_1_graphics_1_1_image_1a9a41e220bfdd4a3cdc749964e57f161f: .. ref-code-block:: cpp :class: doxyrest-title-code-block unsigned int getMemSize() const .. rubric:: Returns: The :ref:`Image ` Size on Memory (in bytes) .. index:: pair: function; getSize .. _doxid-class_e_e_1_1_graphics_1_1_image_1ac907cb1fbbe05c929177c3fbcec5f981: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Sizei` getSize() .. rubric:: Returns: The image dimensions .. index:: pair: function; saveToFile .. _doxid-class_e_e_1_1_graphics_1_1_image_1a8ad5df5718a4167a74986efa90aa7c73: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual bool saveToFile(const std::string& filepath, const :ref:`SaveType`& Format) Save the :ref:`Image ` to a new File in a specific format .. index:: pair: function; createMaskFromColor .. _doxid-class_e_e_1_1_graphics_1_1_image_1a5b3c95b26f8aa0ab9440fdd95208ca69: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void createMaskFromColor(const :ref:`Color`& ColorKey, :ref:`Uint8` Alpha) Create an Alpha mask from a Color .. index:: pair: function; createMaskFromColor .. _doxid-class_e_e_1_1_graphics_1_1_image_1a15aec178f426d70e5fabc084675874c4: .. ref-code-block:: cpp :class: doxyrest-title-code-block void createMaskFromColor(const :ref:`RGB`& ColorKey, :ref:`Uint8` Alpha) Create an Alpha mask from a Color .. index:: pair: function; replaceColor .. _doxid-class_e_e_1_1_graphics_1_1_image_1ac004fb898059e42642b0cf0c2a9a52f4: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void replaceColor(const :ref:`Color`& ColorKey, const :ref:`Color`& NewColor) Replace a color on the image .. index:: pair: function; fillWithColor .. _doxid-class_e_e_1_1_graphics_1_1_image_1aa383dca90c2f1b24c93cd41a9d6700e0: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void fillWithColor(const :ref:`Color`& Color) Fill the image with a color .. index:: pair: function; copyImage .. _doxid-class_e_e_1_1_graphics_1_1_image_1a525fac000a322fd484c248b2ee742ee4: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void copyImage(Graphics::Image* image, const :ref:`Uint32`& x = 0, const :ref:`Uint32`& y = 0) Copy the image to this image data, starting from the position x,y .. index:: pair: function; scale .. _doxid-class_e_e_1_1_graphics_1_1_image_1acd1a0256f879609a0c441c05ef7a5a2c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void scale(const :ref:`Float`& scale, :ref:`ResamplerFilter` filter = ResamplerFilter::RESAMPLER_LANCZOS4) Scale the image .. index:: pair: function; resize .. _doxid-class_e_e_1_1_graphics_1_1_image_1af29fcc9e2427c4c52d97539512ad625e: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void resize(const :ref:`Uint32`& newWidth, const :ref:`Uint32`& newHeight, :ref:`ResamplerFilter` filter = ResamplerFilter::RESAMPLER_LANCZOS4) Resize the image .. index:: pair: function; flip .. _doxid-class_e_e_1_1_graphics_1_1_image_1a30b8465995e3d1769437fc7cf4d2f395: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void flip() Flip the image ( rotate the image 90ยบ ) .. index:: pair: function; thumbnail .. _doxid-class_e_e_1_1_graphics_1_1_image_1aad3d4bb4a953c8354f0f34de5d2dc00e: .. ref-code-block:: cpp :class: doxyrest-title-code-block Graphics::Image* thumbnail(const :ref:`Uint32`& maxWidth, const :ref:`Uint32`& maxHeight, :ref:`ResamplerFilter` filter = ResamplerFilter::RESAMPLER_LANCZOS4) Create a thumnail of the image .. index:: pair: function; crop .. _doxid-class_e_e_1_1_graphics_1_1_image_1a08f0917e244692ccc648833529e05b62: .. ref-code-block:: cpp :class: doxyrest-title-code-block Graphics::Image* crop(:ref:`Rect` rect) Creates a cropped image from the current image .. index:: pair: function; avoidFreeImage .. _doxid-class_e_e_1_1_graphics_1_1_image_1ab8189c4da03b67e390049f7dc3daea66: .. ref-code-block:: cpp :class: doxyrest-title-code-block void avoidFreeImage(const bool& AvoidFree) Set as true if you dont want to free the image data in the :ref:`Image ` destruction ( false as default ). .. index:: pair: function; blit .. _doxid-class_e_e_1_1_graphics_1_1_image_1a02cbbe76ae6f472f86d69b48584905d2: .. ref-code-block:: cpp :class: doxyrest-title-code-block void blit(Graphics::Image* image, const :ref:`Uint32`& x = 0, const :ref:`Uint32`& y = 0) Blit the image passed onto the current image .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - image - The source image to blit onto the image * - x - The x position to start drawing the image * - y - The y position to start drawing the image .. index:: pair: function; copy .. _doxid-class_e_e_1_1_graphics_1_1_image_1ac1958716f1357c83b609ea19fb7f3021: .. ref-code-block:: cpp :class: doxyrest-title-code-block Graphics::Image* copy() .. rubric:: Returns: A copy of the original image .. index:: pair: function; operator= .. _doxid-class_e_e_1_1_graphics_1_1_image_1a24a856e12010aa8dcb92f8cd7f94d418: .. ref-code-block:: cpp :class: doxyrest-title-code-block Graphics::Image& operator=(const Image& right) Overload the assigment operator to ensure the image copy .. index:: pair: function; setImageFormatConfiguration .. _doxid-class_e_e_1_1_graphics_1_1_image_1a34894f02993e27715f638142ea7d6f5a: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setImageFormatConfiguration(const :ref:`FormatConfiguration`& imageFormatConfiguration) Set the image format configuration .. index:: pair: function; getImageFormatConfiguration .. _doxid-class_e_e_1_1_graphics_1_1_image_1a6d5904c06fb7562a0e8a28e904b4f952: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`FormatConfiguration`& getImageFormatConfiguration() const .. rubric:: Returns: The image format configuration