|
|
@@ -110,6 +110,8 @@ pipi_image_t *pipi_load_oric(char const *name) |
|
|
|
img->wrap = 0; |
|
|
|
img->u8 = 1; |
|
|
|
|
|
|
|
pipi_release_pixels(img, p); |
|
|
|
|
|
|
|
return img; |
|
|
|
} |
|
|
|
|
|
|
@@ -139,16 +141,15 @@ int pipi_save_oric(pipi_image_t *img, char const *name) |
|
|
|
fwrite("\x00", 1, 1, fp); |
|
|
|
|
|
|
|
if(img->w != WIDTH || img->h != HEIGHT) |
|
|
|
{ |
|
|
|
tmp = pipi_resize(img, WIDTH, HEIGHT); |
|
|
|
p = pipi_get_pixels(tmp, PIPI_PIXELS_RGBA_F); |
|
|
|
} |
|
|
|
else |
|
|
|
p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_F); |
|
|
|
tmp = img; |
|
|
|
p = pipi_get_pixels(tmp, PIPI_PIXELS_RGBA_F); |
|
|
|
data = p->pixels; |
|
|
|
screen = malloc(WIDTH * HEIGHT / 6); |
|
|
|
write_screen(data, screen); |
|
|
|
if(tmp) |
|
|
|
pipi_release_pixels(tmp, p); |
|
|
|
if(tmp != img) |
|
|
|
pipi_free(tmp); |
|
|
|
|
|
|
|
fwrite(screen, 1, WIDTH * HEIGHT / 6, fp); |
|
|
|