Re[2]: Как из больших *.jpg & *.gif сделать thumbnail ?
От: visitant Украина  
Дата: 06.06.02 11:09
Оценка:
И если кто не нашёл (не найдёт ) код GetEncoderClsid() в МСДН

  int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
  {
     UINT  num = 0;          // number of image encoders
     UINT  size = 0;         // size of the image encoder array in bytes

     ImageCodecInfo* pImageCodecInfo = NULL;
     GetImageEncodersSize(&num, &size);
     if(size == 0)
        return -1;  // Failure

     pImageCodecInfo = (ImageCodecInfo*)(malloc(size));
     if(pImageCodecInfo == NULL)
        return -1;  // Failure
     GetImageEncoders(num, size, pImageCodecInfo);
     for(UINT j = 0; j < num; ++j)
     {
       if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 )
       {
         *pClsid = pImageCodecInfo[j].Clsid;
         free(pImageCodecInfo);
         return j;  // Success
       }    
     }
     free(pImageCodecInfo);
     return -1;  // Failure
  }
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.