Ejemplo n.º 1
0
int main(int argc, char *argv[])
{
    image_t *img;

    img = load_jpeg(argv[1]);
    save_as_bmp(img, argv[2]);
    img_destroy(img);

    return 0;
}
Ejemplo n.º 2
0
 //------------------------------------------------------------------------
 bool pixel_map::save_as_bmp(const char *filename) const
 {
     FILE *fd = fopen(filename, "wb");
     bool ret = false;
     if(fd)
     {
         ret = save_as_bmp(fd);
         fclose(fd);
     }
     return ret;
 }
Ejemplo n.º 3
0
void _0000_meshgrid()
{
    auto const& [X, Y] = feng::meshgrid( 384, 512 );
    X.save_as_bmp( "./images/0000_meshgrid_x.bmp", "grey" );
    Y.save_as_bmp( "./images/0000_meshgrid_y.bmp", "grey" );

    {
        auto const& [X, Y] = feng::meshgrid( 3, 5 );
        std::cout << X << std::endl;
        std::cout << Y << std::endl;
    }
}
Ejemplo n.º 4
0
int main(int argc, char *argv[])
{
    image_t *img, *dst;

    if (argc < 3) {
        printf("Usage : <src_path> <dst_path>.\n");
    }

    img = load_bmp(argv[1]);

    dst = gauss_filter(img, 10);

    save_as_bmp(dst, argv[2]);

    img_destroy(img);
    img_destroy(dst);

    return 0;
}