Files
Geneweb/lib/imageDisplay.mli
2024-03-05 22:01:20 +01:00

25 lines
1.0 KiB
OCaml
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

open Config
val print_image_file : config -> string -> (unit, string) result
(** [print_image_file conf fname] send HTTP respose with content of an image
file at the path [fname].
MIME type of an image is deducted from [fname] extension. Returns [false]
if image wasn't found or couldn't be send. *)
val print_source : config -> string -> unit
(** Display an image of given filename in images folder
Filename may contain sub-folders, but cannot point outside images *)
val print : config -> Gwdb.base -> unit
(** Searches image's filename in the environement [conf.env] and sends
HTTP response with its content on the socket. If filename isn't presented,
looks up personal image (portrait) for person mentionned in [conf.env] *)
val print_html : config -> unit
(** Sends HTTP response with HTML page containg just image specified in
arguments. *)
val print_placeholder_gendered_portrait : config -> Gwdb.person -> int -> unit
(** prints html `<img>` tag of the default gendered portrait with square
size [size] *)