bikral 1
bikral
ShadowFon 1
ShadowFon
D 1
delimuratt
PrimeAC 1
PrimeAC
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Best Studio 1
Best Studio
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com

Client'e gif desteği ekleme

  • Konuyu başlatan Konuyu başlatan Koray'
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 31
  • Görüntüleme Görüntüleme 7K

Koray'

Pasha37
Uzman
Katılım
21 Haz 2013
Konular
198
Mesajlar
1,744
Çözüm
8
Online süresi
17d 3h
Reaksiyon Skoru
2,661
Altın Konu
3
Başarım Puanı
278
MmoLira
747
DevLira
103
Ticaret - 0%
0   0   0

ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!

Bir serverın packinde tesadüfen gördüm deneme amaçlı yapmak istedim, ne amaçla kullanırsınız size kalmış. AniImage olarak onlarca resim kullanmak yerine ya da lonca simgeleri için işe yarar olabilir.



* EterLib/GrpImage.cpp

Arat:
Kod:
CGraphicImage::~CGraphicImage()
{
}

Üstüne ekle:
Kod:
CGraphicImage::CGraphicImage(const char* c_szFileName, const void* c_pvBuf, int32_t iSize, uint32_t dwFilter) :
    CResource(c_szFileName),
    m_dwFilter(dwFilter)
{
    m_rect.bottom = m_rect.right = m_rect.top = m_rect.left = 0;
    Load(iSize, c_pvBuf);
}

* EterLib/GrpImage.h

Arat:
Kod:
CGraphicImage(const char* c_szFileName, uint32_t dwFilter = D3DX_FILTER_LINEAR);

Altına ekle:
Kod:
    CGraphicImage(const char* c_szFileName, const void* c_pvBuf, int32_t iSize, uint32_t dwFilter = D3DX_FILTER_LINEAR);

* EterLib/Resource.cpp

Arat:
Kod:
void CResource::Reload()

Üstüne ekle:
Kod:
void CResource::Load(int32_t iSize, const void* c_pvBuf)
{
    if (me_state != STATE_EMPTY)
        return;

    if (OnLoad(iSize, c_pvBuf))
        me_state = STATE_EXIST;
    else
        me_state = STATE_ERROR;

    //Tracef("CResource::Load %s\n", GetFileName());
}

* EterLib/Resource.h
Arat:
Kod:
    void            Load();

Altına ekle:
Kod:
    void            Load(int32_t iSize, const void* c_pvBuf);

* EterPythonLib/PythonWindow.cpp

Ekle:
Kod:
#include <gif_lib.h>
#include <wingdi.h>

--

Arat:
Kod:
    void CAniImageBox::OnEndFrame()
    {
        PyCallClassMemberFunc(m_poHandler, "OnEndFrame", BuildEmptyTuple());
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////////////////////

Altına ekle:
Kod:
    uint32_t CGifImageBox::Type()
    {
        static uint32_t s_dwType = GetCRC32("CGifImageBox", strlen("CGifImageBox"));
        return (s_dwType);
    }

    BOOL CGifImageBox::OnIsType(uint32_t dwType)
    {
        if (CGifImageBox::Type() == dwType)
            return TRUE;

        return FALSE;
    }

    CGifImageBox::CGifImageBox(PyObject* ppyObject)
        : CAniImageBox(ppyObject)
    {
    }
    CGifImageBox::~CGifImageBox()
    {
    }

    bool RawFrameToBmpImage(SavedImage* currentFrame, GifFileType* gifFile, std::vector <uint8_t>& outData)
    {
        if (!currentFrame || !gifFile)
        {
            TraceError("RawFrameToBmpImage: Invalid parameters.");
            return false;
        }

        auto& imageDesc = currentFrame->ImageDesc;
        auto* colorMap = (imageDesc.ColorMap) ? imageDesc.ColorMap : gifFile->SColorMap;
        if (!colorMap)
        {
            TraceError("RawFrameToBmpImage: ColorMap is null.");
            return false;
        }

        const int width = imageDesc.Width;
        const int height = imageDesc.Height;
        const int rowPadding = (4 - (width * 3 % 4)) % 4;
        const std::size_t rowDataSize = static_cast<std::size_t>(width * 3 + rowPadding) * height;

        BITMAPFILEHEADER fileHeader = {
            0x4D42, // "BM"
            static_cast<uint32_t>(sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + rowDataSize),
            0, // Reserved1
            0, // Reserved2
            sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)
        };

        BITMAPINFOHEADER infoHeader = {
            sizeof(BITMAPINFOHEADER),
            width,
            height,
            1, // Planes
            24, // BitCount
            0, // Compression
            static_cast<uint32_t>(rowDataSize),
            0, // XPelsPerMeter
            0, // YPelsPerMeter
            0, // ClrUsed
            0  // ClrImportant
        };

        outData.resize(fileHeader.bfSize);
        std::memcpy(outData.data(), &fileHeader, sizeof(fileHeader));
        std::memcpy(outData.data() + sizeof(fileHeader), &infoHeader, sizeof(infoHeader));

        auto pixelData = outData.begin() + fileHeader.bfOffBits;
        for (int y = height - 1; y >= 0; --y)
        {
            for (int x = 0; x < width; ++x)
            {
                const int index = y * width + x;
                const GifByteType colorIndex = currentFrame->RasterBits[index];
                const GifColorType& gifColor = colorMap->Colors[colorIndex];

                *pixelData++ = gifColor.Blue;
                *pixelData++ = gifColor.Green;
                *pixelData++ = gifColor.Red;
            }
            pixelData = std::fill_n(pixelData, rowPadding, 0x00);
        }
    }

    bool CGifImageBox::LoadGif(const char* c_szFileName)
    {
        if (!c_szFileName || !*c_szFileName)
            return false;

        // Open GIF file
        int error;
        GifFileType* gif = DGifOpenFileName(c_szFileName, &error);
        if (!gif)
        {
            const char* c_szError = GifErrorString(error);
            TraceError("Failed to open GIF file: %s with error: %s", c_szFileName, c_szError);
            return false;
        }

        // Read the GIF into memory
        if (DGifSlurp(gif) == GIF_ERROR)
        {
            TraceError("Failed to read GIF file: %s", c_szFileName);
            DGifCloseFile(gif, &error);
            return false;
        }

        // Iterate through the frames
        for (int i = 0; i < gif->ImageCount; ++i)
        {
            // Get the current frame
            SavedImage* currentImage = &gif->SavedImages[i];

            // Convert the frame to BMP image
            std::vector <uint8_t> bmpBuffer;
            if (!RawFrameToBmpImage(currentImage, gif, bmpBuffer))
            {
                TraceError("Failed to convert GIF(%s) frame #%d to BMP image.", c_szFileName, i);
                continue;
            }

            // Create name for the frame
            char frameFileName[256]{ '\0' };
            snprintf(frameFileName, sizeof(frameFileName), "gif_frame%d_%s", i, c_szFileName);

            // Create the image instance
            CGraphicImage* pImage = new CGraphicImage(frameFileName, bmpBuffer.data(), bmpBuffer.size(), D3DX_FILTER_LINEAR);
            if (!pImage)
            {
                TraceError("Failed to create image instance for GIF(%s) frame #%d.", c_szFileName, i);
                continue;
            }

            // Create the expanded image instance
            CGraphicExpandedImageInstance* pImageInstance = CGraphicExpandedImageInstance::New();
            pImageInstance->SetImagePointer(pImage);

            // Add the image instance to the vector if it's not empty
            if (pImageInstance->IsEmpty())
            {
                CGraphicExpandedImageInstance::Delete(pImageInstance);
            }
            else
            {
                pImageInstance->SetPosition(m_rect.left, m_rect.top);
                m_ImageVector.push_back(pImageInstance);
            }
        }

        // Clean up
        DGifCloseFile(gif, &error);

        return true;
    }

    bool CGifImageBox::UnloadGif()
    {
        for (auto pImage : m_ImageVector)
            CGraphicExpandedImageInstance::Delete(pImage);

        m_ImageVector.clear();
        return true;
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////////////////////

* EterPythonLib/PythonWindow.h

Arat:
Kod:
    // Button
    class CButton : public CWindow

Üstüne ekle:
Kod:
    class CGifImageBox : public CAniImageBox
    {
    public:
        static uint32_t Type();

        public:
            CGifImageBox(PyObject* ppyObject);
            virtual ~CGifImageBox();

            bool LoadGif(const char* c_szFileName);
            bool UnloadGif();

        protected:
            BOOL OnIsType(uint32_t dwType);
    };

* EterPythonLib\PythonWindowManager.cpp

Arat:
Kod:
        case WT_ANI_IMAGEBOX:
            return new CAniImageBox(po);
            break;

Altına ekle:
Kod:
        case WT_GIF_IMAGEBOX:
            return new CGifImageBox(po);
            break;

---

Arat:
Kod:
    CWindow* CWindowManager::RegisterAniImageBox(PyObject* po, const char* c_szLayer)
    {
        assert(m_LayerWindowMap.end() != m_LayerWindowMap.find(c_szLayer));

        CWindow* pWin = new CAniImageBox(po);
        m_LayerWindowMap[c_szLayer]->AddChild(pWin);

#ifdef __WINDOW_LEAK_CHECK__
        gs_kSet_pkWnd.insert(pWin);
#endif
        return pWin;
    }

Altına ekle:
Kod:
    CWindow* CWindowManager::RegisterGifImageBox(PyObject* po, const char* c_szLayer)
    {
        assert(m_LayerWindowMap.end() != m_LayerWindowMap.find(c_szLayer));

        CWindow* pWin = new CGifImageBox(po);
        m_LayerWindowMap[c_szLayer]->AddChild(pWin);

#ifdef __WINDOW_LEAK_CHECK__
        gs_kSet_pkWnd.insert(pWin);
#endif
        return pWin;
    }

* EterPythonLib\PythonWindowManager.h

Arat:
Kod:
            WT_ANI_IMAGEBOX,

Altına ekle:
Kod:
            WT_GIF_IMAGEBOX,

--

Arat:
Kod:
        CWindow* RegisterImageBox(PyObject* po, const char* c_szLayer);

Altına ekle:
Kod:
        CWindow* RegisterGifImageBox(PyObject* po, const char* c_szLayer);

* EterPythonLib\PythonWindowManagerModule.cpp

Ekle:
Kod:
PyObject* wndMgrRegisterGifImageBox(PyObject* poSelf, PyObject* poArgs)
{
    PyObject* po;
    if (!PyTuple_GetObject(poArgs, 0, &po))
        return Py_BuildException();
    char* szLayer;
    if (!PyTuple_GetString(poArgs, 1, &szLayer))
        return Py_BuildException();

    UI::CWindow* pWindow = UI::CWindowManager::Instance().RegisterGifImageBox(po, szLayer);
    return Py_BuildValue("i", pWindow);
}

PyObject* wndGifImageLoadGif(PyObject* poSelf, PyObject* poArgs)
{
    UI::CWindow* pWindow;
    if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
        return Py_BuildException();
    char* szFileName;
    if (!PyTuple_GetString(poArgs, 1, &szFileName))
        return Py_BuildException();

    ((UI::CGifImageBox*)pWindow)->LoadGif(szFileName);

    return Py_BuildNone();
}
PyObject* wndGifImageUnloadGif(PyObject* poSelf, PyObject* poArgs)
{
    UI::CWindow* pWindow;
    if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
        return Py_BuildException();

    ((UI::CGifImageBox*)pWindow)->UnloadGif();

    return Py_BuildNone();
}

Arat:
Kod:
        { "RegisterAniImageBox",        wndMgrRegisterAniImageBox,            METH_VARARGS },

Altına ekle:
Kod:
        { "RegisterGifImageBox",        wndMgrRegisterGifImageBox,            METH_VARARGS },
        { "LoadGif",                    wndGifImageLoadGif,                    METH_VARARGS },
        { "UnloadGif",                    wndGifImageUnloadGif,                METH_VARARGS },

*ScriptLib\Resource.cpp

Arat:
Kod:
    m_resManager.RegisterResourceNewFunctionPointer("bmp", NewImage);

Altına ekle:
Kod:
    m_resManager.RegisterResourceNewFunctionPointer("gif", NewImage);

* UserInterface\UserInterface.cpp

Ekle:
Kod:
#pragma comment( lib, "gif.lib" )

---

* root/ui.py

Ekle:
Kod:
class GifBox(Window):
    def __init__(self, layer = "UI"):
        Window.__init__(self, layer)

        self.eventDict={}
        self.arg = -1
        self.argOut = -1
        self.imageLoaded = False

    def __del__(self):
        Window.__del__(self)

    def RegisterWindow(self, layer):
        self.hWnd = wndMgr.RegisterGifImageBox(self, layer)

    def LoadImage(self, imageName):
        self.name=imageName
        wndMgr.LoadGif(self.hWnd, imageName)
        self.imageLoaded = True

        if len(self.eventDict)!=0:
            print "LOAD IMAGE", self, self.eventDict

    def UnloadImage(self):
        if self.imageLoaded:
            wndMgr.UnloadGif(self.hWnd)
            self.imageLoaded = False

    def SetAlpha(self, alpha):
        wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)

    def SetDiffuseColor(self, r,g,b,a=1.0):
        wndMgr.SetDiffuseColor(self.hWnd, r,g,b,a)

    def SetAlphaColor(self, r,g,b,alpha=1.0):
        wndMgr.SetDiffuseColor(self.hWnd, r,g,b, alpha)

    def GetWidth(self):
        return wndMgr.GetWidth(self.hWnd)

    def GetHeight(self):
        return wndMgr.GetHeight(self.hWnd)

  
    def SetRenderingRect(self, left, top, right, bottom):
        wndMgr.SetRenderingRect(self.hWnd, left, top, right, bottom)

    def SetPercentage(self, curValue, maxValue):
        if maxValue:
            self.SetRenderingRect(0.0, 0.0, -1.0 + float(curValue) / float(maxValue), 0.0)
        else:
            self.SetRenderingRect(0.0, 0.0, 0.0, 0.0)

  
    def SetScale(self, xScale, yScale):
        wndMgr.SetScale(self.hWnd, xScale, yScale)

---

Extern'e ekle:


---

Örnek:
Kod:
        self.testgif = ui.GifBox()
        self.testgif.SetParent(self)
        self.testgif.SetPosition(180,20)
        self.testgif.LoadImage("nice.gif")
        self.testgif.Show()

---

BMP yerine TGA kullanmak için;
Konuya ek bir güncelleme yapmak istiyorum BMP formatında 24 bit işleme yapıyoruz bundan dolayı alphachannel mevcut değil yani transparanlıkları doğru şekilde işleyemiyoruz.


Bu yüzden dolayı kodu biraz modifiye ettim aşağıdaki şekilde düzenlerseniz daha uygun olacaktır.

Orijinal halindeki gif çıktısı


Benim düzenlememdeki halindeki gif çıktısı



Kod:
    PythonWindow.cpp

// includeler arasına ekle
#include <array>

// Orijinaldeki kodu aşağıdaki şekilde değiştir.

    bool RawFrameToTGAImage(SavedImage* currentFrame, GifFileType* gifFile, std::vector <uint8_t>& outData)
    {
        if (!currentFrame || !gifFile)
        {
            TraceError("RawFrameToTGAImage: Invalid parameters.");
            return false;
        }

        auto& imageDesc = currentFrame->ImageDesc;
        auto* colorMap = (imageDesc.ColorMap) ? imageDesc.ColorMap : gifFile->SColorMap;
        if (!colorMap)
        {
            TraceError("RawFrameToTGAImage: ColorMap is null.");
            return false;
        }

        const int width = imageDesc.Width;
        const int height = imageDesc.Height;

        // TGA Header
        std::array<uint8_t, 18> header = {0};
        header[2] = 2; // Uncompressed RGB
        header[12] = width & 0xFF;
        header[13] = (width >> 8) & 0xFF;
        header[14] = height & 0xFF;
        header[15] = (height >> 8) & 0xFF;
        header[16] = 32; // 32 bits per pixel

        outData.insert(outData.end(), header.begin(), header.end());

        // Get transparency information from the GIF
        GraphicsControlBlock gcb;
        DGifSavedExtensionToGCB(gifFile, currentFrame - gifFile->SavedImages, &gcb);

        for (int y = height - 1; y >= 0; --y)
        {
            for (int x = 0; x < width; ++x)
            {
                const int index = y * width + x;
                const GifByteType colorIndex = currentFrame->RasterBits[index];
                if (colorIndex < colorMap->ColorCount)
                {
                    const GifColorType& gifColor = colorMap->Colors[colorIndex];
                    outData.push_back(gifColor.Blue);
                    outData.push_back(gifColor.Green);
                    outData.push_back(gifColor.Red);
                    // If the pixel is transparent in the GIF, make it transparent in the TGA
                    outData.push_back((gcb.TransparentColor && colorIndex == gcb.TransparentColor) ? 0x00 : 0xFF);
                }
                else
                {
                    TraceError("RawFrameToTGAImage: Color index out of range.");
                    return false;
                }
            }
        }

        return true;
    }


    bool CGifImageBox::LoadGif(const char* c_szFileName)
    {
        if (!c_szFileName || !*c_szFileName)
            return false;

        // Open GIF file
        int error;
        GifFileType* gif = DGifOpenFileName(c_szFileName, &error);
        if (!gif)
        {
            const char* c_szError = GifErrorString(error);
            TraceError("Failed to open GIF file: %s with error: %s", c_szFileName, c_szError);
            return false;
        }

        // Read the GIF into memory
        if (DGifSlurp(gif) == GIF_ERROR)
        {
            TraceError("Failed to read GIF file: %s", c_szFileName);
            DGifCloseFile(gif, &error);
            return false;
        }

        // Iterate through the frames
        for (int i = 0; i < gif->ImageCount; ++i)
        {
            // Get the current frame
            SavedImage* currentImage = &gif->SavedImages[i];

            // Convert the frame to TGA image
            std::vector <uint8_t> tgaBuffer;
            if (!RawFrameToTGAImage(currentImage, gif, tgaBuffer))
            {
                TraceError("Failed to convert GIF(%s) frame #%d to TGA image.", c_szFileName, i);
                continue;
            }

            // Create name for the frame
            char frameFileName[256]{ '\0' };
            snprintf(frameFileName, sizeof(frameFileName), "gif_frame%d_%s", i, c_szFileName);

            // Create the image instance
            CGraphicImage* pImage = new CGraphicImage(frameFileName, tgaBuffer.data(), tgaBuffer.size(), D3DX_FILTER_LINEAR);
            if (!pImage)
            {
                TraceError("Failed to create image instance for GIF(%s) frame #%d.", c_szFileName, i);
                continue;
            }

            // Create the expanded image instance
            CGraphicExpandedImageInstance* pImageInstance = CGraphicExpandedImageInstance::New();
            pImageInstance->SetImagePointer(pImage);

            // Add the image instance to the vector if it's not empty
            if (pImageInstance->IsEmpty())
            {
                CGraphicExpandedImageInstance::Delete(pImageInstance);
            }
            else
            {
                pImageInstance->SetPosition(m_rect.left, m_rect.top);
                m_ImageVector.push_back(pImageInstance);
            }
        }

        // Clean up
        DGifCloseFile(gif, &error);

        return true;
    }
 

Ekli dosyalar

Moderatör tarafında düzenlendi:

En Çok Reaksiyon Alan Mesajlar

Konuya ek bir güncelleme yapmak istiyorum BMP formatında 24 bit işleme yapıyoruz bundan dolayı alphachannel mevcut değil yani transparanlıkları doğru şekilde işleyemiyoruz.


Bu yüzden dolayı kodu biraz modifiye ettim aşağıdaki şekilde düzenlerseniz daha uygun olacaktır.

Orijinal halindeki gif çıktısı

Öğeyi görmek için üye olmalısınız.

Benim düzenlememdeki halindeki gif çıktısı

Öğeyi görmek için üye olmalısınız.


Kod:
    PythonWindow.cpp

// includeler arasına ekle
#include <array>

// Orijinaldeki kodu aşağıdaki şekilde değiştir.

    bool RawFrameToTGAImage(SavedImage* currentFrame, GifFileType* gifFile, std::vector <uint8_t>& outData)
    {
        if (!currentFrame || !gifFile)
        {
            TraceError("RawFrameToTGAImage: Invalid parameters.");
            return false;
        }

        auto& imageDesc = currentFrame->ImageDesc;
        auto* colorMap = (imageDesc.ColorMap) ? imageDesc.ColorMap : gifFile->SColorMap;
        if (!colorMap)
        {
            TraceError("RawFrameToTGAImage: ColorMap is null.");
            return false;
        }

        const int width = imageDesc.Width;
        const int height = imageDesc.Height;

        // TGA Header
        std::array<uint8_t, 18> header = {0};
        header[2] = 2; // Uncompressed RGB
        header[12] = width & 0xFF;
        header[13] = (width >> 8) & 0xFF;
        header[14] = height & 0xFF;
        header[15] = (height >> 8) & 0xFF;
        header[16] = 32; // 32 bits per pixel

        outData.insert(outData.end(), header.begin(), header.end());

        // Get transparency information from the GIF
        GraphicsControlBlock gcb;
        DGifSavedExtensionToGCB(gifFile, currentFrame - gifFile->SavedImages, &gcb);

        for (int y = height - 1; y >= 0; --y)
        {
            for (int x = 0; x < width; ++x)
            {
                const int index = y * width + x;
                const GifByteType colorIndex = currentFrame->RasterBits[index];
                if (colorIndex < colorMap->ColorCount)
                {
                    const GifColorType& gifColor = colorMap->Colors[colorIndex];
                    outData.push_back(gifColor.Blue);
                    outData.push_back(gifColor.Green);
                    outData.push_back(gifColor.Red);
                    // If the pixel is transparent in the GIF, make it transparent in the TGA
                    outData.push_back((gcb.TransparentColor && colorIndex == gcb.TransparentColor) ? 0x00 : 0xFF);
                }
                else
                {
                    TraceError("RawFrameToTGAImage: Color index out of range.");
                    return false;
                }
            }
        }

        return true;
    }


    bool CGifImageBox::LoadGif(const char* c_szFileName)
    {
        if (!c_szFileName || !*c_szFileName)
            return false;

        // Open GIF file
        int error;
        GifFileType* gif = DGifOpenFileName(c_szFileName, &error);
        if (!gif)
        {
            const char* c_szError = GifErrorString(error);
            TraceError("Failed to open GIF file: %s with error: %s", c_szFileName, c_szError);
            return false;
        }

        // Read the GIF into memory
        if (DGifSlurp(gif) == GIF_ERROR)
        {
            TraceError("Failed to read GIF file: %s", c_szFileName);
            DGifCloseFile(gif, &error);
            return false;
        }

        // Iterate through the frames
        for (int i = 0; i < gif->ImageCount; ++i)
        {
            // Get the current frame
            SavedImage* currentImage = &gif->SavedImages[i];

            // Convert the frame to TGA image
            std::vector <uint8_t> tgaBuffer;
            if (!RawFrameToTGAImage(currentImage, gif, tgaBuffer))
            {
                TraceError("Failed to convert GIF(%s) frame #%d to TGA image.", c_szFileName, i);
                continue;
            }

            // Create name for the frame
            char frameFileName[256]{ '\0' };
            snprintf(frameFileName, sizeof(frameFileName), "gif_frame%d_%s", i, c_szFileName);

            // Create the image instance
            CGraphicImage* pImage = new CGraphicImage(frameFileName, tgaBuffer.data(), tgaBuffer.size(), D3DX_FILTER_LINEAR);
            if (!pImage)
            {
                TraceError("Failed to create image instance for GIF(%s) frame #%d.", c_szFileName, i);
                continue;
            }

            // Create the expanded image instance
            CGraphicExpandedImageInstance* pImageInstance = CGraphicExpandedImageInstance::New();
            pImageInstance->SetImagePointer(pImage);

            // Add the image instance to the vector if it's not empty
            if (pImageInstance->IsEmpty())
            {
                CGraphicExpandedImageInstance::Delete(pImageInstance);
            }
            else
            {
                pImageInstance->SetPosition(m_rect.left, m_rect.top);
                m_ImageVector.push_back(pImageInstance);
            }
        }

        // Clean up
        DGifCloseFile(gif, &error);

        return true;
    }


@Koray' istersen konuya ekleme yapabilirsin.


Keyifli forumlar.
paylaşım için teşekkürler
 
Paylaşım için teşekkürler.
 
Paylaşım için teşekkürler
 
Eline sağlık ben de lonca simgeleri için 2 kütüphane kullanarak gif denemeleri yapmıştım fakat tek kütüphane ile daha temiz olmuş
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst