Skip to content

Commit

Permalink
Version report: also include cairo for svg and poppler
Browse files Browse the repository at this point in the history
  • Loading branch information
hzeller committed Jan 15, 2024
1 parent 13c4ca1 commit a429500
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/stb-image-source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ inline void stb_resize_image(const unsigned char *input_pixels, int input_w,
inline void stb_resize_image(const unsigned char *input_pixels, int input_w,
int input_h, unsigned char *output_pixels,
int output_w, int output_h) {
static constexpr int kFramebufferFormat = 4; // RGBA.
static constexpr int kFramebufferFormat = 4; // RGBA.
stbir_resize_uint8(input_pixels, input_w, input_h, 0, //
output_pixels, output_w, output_h, 0, //
kFramebufferFormat);
Expand Down
17 changes: 11 additions & 6 deletions src/timg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@
# include <sixel.h>
#endif
#ifdef WITH_TIMG_RSVG
# include <cairo-version.h>
# include <librsvg/rsvg.h>
#endif
#ifdef WITH_TIMG_POPPLER
# include <cairo-version.h>
# include <poppler.h>
#endif

Expand Down Expand Up @@ -443,11 +445,14 @@ static int PrintVersion(FILE *stream) {
fprintf(stream, "Turbo JPEG\n");
#endif
#ifdef WITH_TIMG_RSVG
fprintf(stream, "librsvg %d.%d.%d\n", LIBRSVG_MAJOR_VERSION,
LIBRSVG_MINOR_VERSION, LIBRSVG_MICRO_VERSION);
fprintf(stream, "librsvg %d.%d.%d + cairo %d.%d.%d\n",
LIBRSVG_MAJOR_VERSION, LIBRSVG_MINOR_VERSION, LIBRSVG_MICRO_VERSION,
CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR, CAIRO_VERSION_MICRO);
#endif
#ifdef WITH_TIMG_POPPLER
fprintf(stream, "PDF rendering with poppler %s\n", poppler_get_version());
fprintf(stream, "PDF rendering with poppler %s + cairo %d.%d.%d\n",
poppler_get_version(), CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR,
CAIRO_VERSION_MICRO);
#endif
#ifdef WITH_TIMG_QOI
fprintf(stream, "QOI image loading\n");
Expand All @@ -466,12 +471,12 @@ static int PrintVersion(FILE *stream) {
#ifdef WITH_TIMG_VIDEO
fprintf(stream, "Video decoding %s\n", timg::VideoSource::VersionInfo());
#endif
fprintf(stream,
"Half, quarter, iterm2, and kitty graphics output: "
"timg builtin.\n");
#ifdef WITH_TIMG_SIXEL
fprintf(stream, "Libsixel version %s\n", LIBSIXEL_VERSION);
#endif
fprintf(stream,
"Half, quarter, iterm2, and kitty graphics output: "
"timg builtin.\n");
return 0;
}

Expand Down

0 comments on commit a429500

Please sign in to comment.