summaryrefslogtreecommitdiff
path: root/image/jpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'image/jpeg.c')
-rw-r--r--image/jpeg.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/image/jpeg.c b/image/jpeg.c
index 86f205964..3efe698df 100644
--- a/image/jpeg.c
+++ b/image/jpeg.c
@@ -94,7 +94,7 @@ bool nsjpeg_convert(struct content *c, int w, int h)
width = cinfo.output_width;
height = cinfo.output_height;
- bitmap = bitmap_create(width, height, false);
+ bitmap = bitmap_create(width, height, BITMAP_ALLOCATE_MEMORY);
if (bitmap)
pixels = bitmap_get_buffer(bitmap);
if ((!bitmap) || (!pixels)) {
@@ -227,6 +227,22 @@ bool nsjpeg_redraw(struct content *c, int x, int y,
/**
+ * Redraw a CONTENT_JPEG with appropriate tiling.
+ */
+
+bool nsjpeg_redraw_tiled(struct content *c, int x, int y,
+ int width, int height,
+ int clip_x0, int clip_y0, int clip_x1, int clip_y1,
+ float scale, unsigned long background_colour,
+ bool repeat_x, bool repeat_y)
+{
+ return plot.bitmap_tile(x, y, width, height,
+ c->bitmap, background_colour,
+ repeat_x, repeat_y);
+}
+
+
+/**
* Destroy a CONTENT_JPEG and free all resources it owns.
*/