/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_save_to_bmp.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/29 20:50:35 by rbousset #+# #+# */ /* Updated: 2020/02/29 20:50:37 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include #include #include static int8_t ft_convert_image_to_bmp(t_bmp_file bmp_file, void *img, t_cub *cl) { /* int32_t filelen; */ /* uint8_t *bmp; */ /* (void)img; */ /* (void)bmp_file; */ /* filelen = 54 + 3 * cl->wlist.x_size * cl->wlist.y_size; */ /* if (!(bmp = (uint8_t*)malloc((filelen - 54) * sizeof(uint8_t)))) */ /* return (-1); */ /* ft_memdel((void**)&bmp); */ return (0); } int8_t ft_save_to_bmp(void *img, t_cub *cl) { t_bmp_file bmp_file; t_bmp_info bmp_info; t_bmp_colors bmp_colors; bmp_file = ft_init_bmp(); bmp_info = ft_init_bmp_info(); bmp_colors = ft_init_bmp_colors(); if (ft_convert_image_to_bmp(bmp_file, img, cl) < 0) return (-1); return (0); }