diff --git a/CGAL_ImageIO/examples/CGALimageIO/extract_a_sub_image.cpp b/CGAL_ImageIO/examples/CGALimageIO/extract_a_sub_image.cpp index d626bd113fa..7927c8430d5 100644 --- a/CGAL_ImageIO/examples/CGALimageIO/extract_a_sub_image.cpp +++ b/CGAL_ImageIO/examples/CGALimageIO/extract_a_sub_image.cpp @@ -23,12 +23,12 @@ int main(int argc, char **argv) { assert(ymax < image->ydim); assert(zmax < image->zdim); - const int new_xdim = xmax + 1 - xmin; - const int new_ydim = ymax + 1 - ymin; - const int new_zdim = zmax + 1 - zmin; + const auto new_xdim = xmax + 1 - xmin; + const auto new_ydim = ymax + 1 - ymin; + const auto new_zdim = zmax + 1 - zmin; - auto *new_image = ::_createImage(new_xdim, new_ydim, new_zdim, image->vx, - image->vx, image->vx, image->vz, image->wdim, + auto *new_image = ::_createImage(new_xdim, new_ydim, new_zdim, 1, + image->vx, image->vy, image->vz, image->wdim, image->wordKind, image->sign); const auto* const data = static_cast(image->data); auto* new_data = static_cast(new_image->data); diff --git a/CGAL_ImageIO/include/CGAL/ImageIO.h b/CGAL_ImageIO/include/CGAL/ImageIO.h index e4fed7772f1..2153a6d74b8 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO.h @@ -319,8 +319,8 @@ CGAL_IMAGEIO_EXPORT void _freeImage(_image *im); @param w image word size in bytes @param wk image word kind @param sgn image word sign */ -CGAL_IMAGEIO_EXPORT _image *_createImage(int x, int y, int z, int v, - float vx, float vy, float vz, int w, +CGAL_IMAGEIO_EXPORT _image *_createImage(std::size_t x, std::size_t y, std::size_t z, std::size_t v, + double vx, double vy, double vz, std::size_t w, WORD_KIND wk, SIGN sgn); diff --git a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h index c91d700a254..b0681331d84 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h @@ -623,8 +623,8 @@ _image *_initImage() { } CGAL_INLINE_FUNCTION -_image *_createImage(int x, int y, int z, int v, - float vx, float vy, float vz, int w, +_image *_createImage(std::size_t x, std::size_t y, std::size_t z, std::size_t v, + double vx, double vy, double vz, std::size_t w, WORD_KIND wk, SIGN sgn) { _image *im;