/* bitmap_scale.h - Bitmap scaling functions. */ /* * VAS_EBOOT -- GRand Unified Bootloader * Copyright (C) 2008,2009 Free Software Foundation, Inc. * * VAS_EBOOT is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * VAS_EBOOT is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with VAS_EBOOT. If not, see . */ #ifndef VAS_EBOOT_BITMAP_SCALE_HEADER #define VAS_EBOOT_BITMAP_SCALE_HEADER 1 #include #include #include enum VasEBoot_video_bitmap_scale_method { /* Choose the fastest interpolation algorithm. */ VAS_EBOOT_VIDEO_BITMAP_SCALE_METHOD_FASTEST, /* Choose the highest quality interpolation algorithm. */ VAS_EBOOT_VIDEO_BITMAP_SCALE_METHOD_BEST, /* Specific algorithms: */ /* Nearest neighbor interpolation. */ VAS_EBOOT_VIDEO_BITMAP_SCALE_METHOD_NEAREST, /* Bilinear interpolation. */ VAS_EBOOT_VIDEO_BITMAP_SCALE_METHOD_BILINEAR }; typedef enum VasEBoot_video_bitmap_selection_method { VAS_EBOOT_VIDEO_BITMAP_SELECTION_METHOD_STRETCH, VAS_EBOOT_VIDEO_BITMAP_SELECTION_METHOD_CROP, VAS_EBOOT_VIDEO_BITMAP_SELECTION_METHOD_PADDING, VAS_EBOOT_VIDEO_BITMAP_SELECTION_METHOD_FITWIDTH, VAS_EBOOT_VIDEO_BITMAP_SELECTION_METHOD_FITHEIGHT } VasEBoot_video_bitmap_selection_method_t; typedef enum VasEBoot_video_bitmap_v_align { VAS_EBOOT_VIDEO_BITMAP_V_ALIGN_TOP, VAS_EBOOT_VIDEO_BITMAP_V_ALIGN_CENTER, VAS_EBOOT_VIDEO_BITMAP_V_ALIGN_BOTTOM } VasEBoot_video_bitmap_v_align_t; typedef enum VasEBoot_video_bitmap_h_align { VAS_EBOOT_VIDEO_BITMAP_H_ALIGN_LEFT, VAS_EBOOT_VIDEO_BITMAP_H_ALIGN_CENTER, VAS_EBOOT_VIDEO_BITMAP_H_ALIGN_RIGHT } VasEBoot_video_bitmap_h_align_t; VasEBoot_err_t EXPORT_FUNC (VasEBoot_video_bitmap_create_scaled) (struct VasEBoot_video_bitmap **dst, int dst_width, int dst_height, struct VasEBoot_video_bitmap *src, enum VasEBoot_video_bitmap_scale_method scale_method); VasEBoot_err_t EXPORT_FUNC (VasEBoot_video_bitmap_scale_proportional) (struct VasEBoot_video_bitmap **dst, int dst_width, int dst_height, struct VasEBoot_video_bitmap *src, enum VasEBoot_video_bitmap_scale_method scale_method, VasEBoot_video_bitmap_selection_method_t selection_method, VasEBoot_video_bitmap_v_align_t v_align, VasEBoot_video_bitmap_h_align_t h_align); #endif /* ! VAS_EBOOT_BITMAP_SCALE_HEADER */