Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CImg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ians-nmh-siebert
extern
CImg
Commits
760de04b
Commit
760de04b
authored
Aug 14, 2018
by
David Tschumperlé
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
8d1a468e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CImg.h
+3
-11
3 additions, 11 deletions
CImg.h
with
3 additions
and
11 deletions
CImg.h
+
3
−
11
View file @
760de04b
...
@@ -8047,11 +8047,7 @@ namespace cimg_library_suffixed {
...
@@ -8047,11 +8047,7 @@ namespace cimg_library_suffixed {
static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs,
static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs,
t *ptrd, const unsigned int wd, const unsigned int hd) {
t *ptrd, const unsigned int wd, const unsigned int hd) {
typedef typename cimg::last<T,cimg_ulong>::type ulongT;
typedef typename cimg::last<T,cimg_ulong>::type ulongT;
#if UINTPTR_MAX==0xffffffff || defined(__arm__) || defined(_M_ARM) || ((ULONG_MAX)==(UINT_MAX))
const ulongT one = 1;
const double one = 1.0;
#else
const unsigned long one = 1UL;
#endif
CImg<ulongT> off_x(wd), off_y(hd + 1);
CImg<ulongT> off_x(wd), off_y(hd + 1);
if (wd==ws) off_x.fill(1);
if (wd==ws) off_x.fill(1);
else {
else {
...
@@ -29456,18 +29452,14 @@ namespace cimg_library_suffixed {
...
@@ -29456,18 +29452,14 @@ namespace cimg_library_suffixed {
// Nearest neighbor interpolation.
// Nearest neighbor interpolation.
//
//
case 1 : {
case 1 : {
#if UINTPTR_MAX==0xffffffff || defined(__arm__) || defined(_M_ARM) || ((ULONG_MAX)==(UINT_MAX))
const double one = 1.0;
#else
const unsigned long one = 1UL;
#endif
res.assign(sx,sy,sz,sc);
res.assign(sx,sy,sz,sc);
CImg<ulongT> off_x(sx), off_y(sy + 1), off_z(sz + 1), off_c(sc + 1);
CImg<ulongT> off_x(sx), off_y(sy + 1), off_z(sz + 1), off_c(sc + 1);
const ulongT
const ulongT
wh = (ulongT)_width*_height,
wh = (ulongT)_width*_height,
whd = (ulongT)_width*_height*_depth,
whd = (ulongT)_width*_height*_depth,
sxy = (ulongT)sx*sy,
sxy = (ulongT)sx*sy,
sxyz = (ulongT)sx*sy*sz;
sxyz = (ulongT)sx*sy*sz,
one = (ulongT)1;
if (sx==_width) off_x.fill(1);
if (sx==_width) off_x.fill(1);
else {
else {
ulongT *poff_x = off_x._data, curr = 0;
ulongT *poff_x = off_x._data, curr = 0;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment