"bmp",
"ico",
"tga",
+ "tgv",
NULL
};
if ((iw->data) && (iw->w > 0) && (iw->h > 0))
{
Eet_Image_Encoding lossy = EET_IMAGE_LOSSLESS;
- int mode, qual;
+ int mode, qual, comp = 0;
snprintf(buf, sizeof(buf), "edje/images/%i", iw->img->id);
qual = 80;
if (qual < min_quality) qual = min_quality;
if (qual > max_quality) qual = max_quality;
if (!allow_etc1 || (iw->alpha)) lossy = EET_IMAGE_JPEG;
- else lossy = EET_IMAGE_ETC1;
+ else
+ {
+ lossy = EET_IMAGE_ETC1;
+ comp = !no_comp;
+ }
}
if (iw->alpha)
{
bytes = eet_data_image_write(iw->ef, buf,
iw->data, iw->w, iw->h,
iw->alpha,
- 0, qual, lossy);
+ comp, qual, lossy);
if (bytes <= 0)
{
snprintf(buf2, sizeof(buf2),
static void *
eet_data_image_etc1_compressed_convert(int *size,
- const unsigned char *data,
+ const unsigned char *data8,
unsigned int w,
unsigned int h,
int quality,
unsigned int x, y;
unsigned int compress_length;
unsigned int real_x, real_y;
+ unsigned int *data = (unsigned int *) data8;
char *comp;
char *buffer;
void *result;
if (lmax > 0)
{
- for (k = duplicate_h[0]; k < kmax; k++)
+ for (k = 0; k < kmax; k++)
memcpy(&todo[(k + duplicate_h[0]) * 16 + duplicate_w[0] * 4],
&data[(real_y + i + k) * w + real_x + j],
4 * lmax);
if (compression)
{
- wlen = LZ4_compress(buffer, comp, block_count * 8);
+ wlen = LZ4_compressHC(buffer, comp, block_count * 8);
}
else
{