Commit Graph

5 Commits

Author SHA1 Message Date
Leandro Ribeiro cf59ed0ebe shared: remove load_image()
We have a single user of load_image(), and that can be easily replaced
by the new and more flexible weston_image_load() function.

So replace and drop load_image() from the code.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-06-11 10:13:18 -03:00
Leandro Ribeiro d3f393031f shared: allow to get ICC profile from PNG using weston_image_load()
This introduces the functionality to also load the embedded ICC profile
from an image. For now, this only supports PNG files, but in the next
commit we add the support for JPEG as well.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-06-11 10:13:18 -03:00
Leandro Ribeiro 1b0f8693c6 shared: add weston_image_load()
In the next commits we plan to add support to load ICC profiles that are
embedded in images. So we need something more flexible than
load_image().

This patch introduces a new function that, for now, does the same as
load_image(). For now we keep load_image() as well, but the plan is
to drop it later.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-06-11 10:13:18 -03:00
Bryce Harrington 6c6164c5ba shared: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:18 -07:00
Kristian Høgsberg 3c2360ff9d Add new shared/image-loader.h to separate include dependencies
Before, cairo-util.h would combine pixman and cairo includes.  X11 and
Wayland compositors uses this to load an image as a pixman_image_t but are
forced to include cairo headers.  Clients use load_cairo_surface to
load images as cairo_surface_t's, but are forced to include pixman.h.

We move the load_image pixman prototype to its own header, so compositors
can get at the pixman prototype without including cairo.h and clients
can include the cairo based function without including pixman.h.
2013-01-28 16:02:04 -05:00