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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ians-nmh-siebert
extern
CImg
Commits
420ee255
Commit
420ee255
authored
6 years ago
by
David Tschumperlé
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
2ca6374e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CImg.h
+8
-5
8 additions, 5 deletions
CImg.h
html/header.html
+1
-1
1 addition, 1 deletion
html/header.html
html/header_reference.html
+1
-1
1 addition, 1 deletion
html/header_reference.html
with
10 additions
and
7 deletions
CImg.h
+
8
−
5
View file @
420ee255
...
...
@@ -7988,8 +7988,8 @@ namespace cimg_library_suffixed {
return _empty;
}
#define cimg_fitscreen(dx,dy,dz) CImgDisplay::_fitscreen(dx,dy,dz,
480
,-85,false), \
CImgDisplay::_fitscreen(dx,dy,dz,
480
,-85,true)
#define cimg_fitscreen(dx,dy,dz) CImgDisplay::_fitscreen(dx,dy,dz,
128
,-85,false), \
CImgDisplay::_fitscreen(dx,dy,dz,
128
,-85,true)
static unsigned int _fitscreen(const unsigned int dx, const unsigned int dy, const unsigned int dz,
const int dmin, const int dmax, const bool return_y) {
const int
...
...
@@ -52092,7 +52092,9 @@ namespace cimg_library_suffixed {
_XYZ[2] = (unsigned int)(z0 + z1)/2;
}
x0 = 0; y0 = 0; z0 = 0; x1 = width() - 1; y1 = height() - 1; z1 = depth() - 1;
disp.resize(cimg_fitscreen(_width,_height,_depth),false);
oldw = disp._width; oldh = disp._height;
resize_disp = true;
reset_view = false;
}
if (!x0 && !y0 && !z0 && x1==width() - 1 && y1==height() - 1 && z1==depth() - 1) {
...
...
@@ -52104,10 +52106,11 @@ namespace cimg_library_suffixed {
dx = 1U + x1 - x0, dy = 1U + y1 - y0, dz = 1U + z1 - z0,
tw = dx + (dz>1?dz:0U), th = dy + (dz>1?dz:0U);
if (!is_empty() && !disp.is_fullscreen() && resize_disp) {
const float
ttw = (float)tw*disp.width()/oldw, tth = (float)th*disp.height()/oldh,
dM = std::max(ttw,tth), diM = (float)std::max(disp.width(),disp.height());
const unsigned int
ttw = tw*disp.width()/oldw, tth = th*disp.height()/oldh,
dM = std::max(ttw,tth), diM = (unsigned int)std::max(disp.width(),disp.height()),
imgw = std::max(16U,ttw*diM/dM), imgh = std::max(16U,tth*diM/dM);
imgw = (unsigned int)(ttw*diM/dM), imgh = (unsigned int)(tth*diM/dM);
disp.set_fullscreen(false).resize(cimg_fitscreen(imgw,imgh,1),false);
resize_disp = false;
}
This diff is collapsed.
Click to expand it.
html/header.html
+
1
−
1
View file @
420ee255
...
...
@@ -45,7 +45,7 @@
<a
href=
"http://cimg.eu"
><img
src=
"http://cimg.eu/img/CImgLogo2.jpg"
alt=
""
border=
"0"
/></a><br/>
</center>
<center><font
size=
"-1"
color=
"#777777"
>
Latest stable version:
<b><a
href=
"http://cimg.eu/files/CImg_2.4.0.zip"
>
2.4.0
</a></b>
Latest stable version:
<b><a
href=
"http://cimg.eu/files/CImg_2.4.0.zip"
>
2.4.0
</a></b>
Current pre-release:
<b><a
href=
"http://cimg.eu/files/CImg_latest.zip"
>
2.4.1
</a></b>
</font></center>
</td></tr>
<tr
bgcolor=
"#FFFFFF"
><td><hr
noshade
size=
"1"
style=
"border-top: 1px solid #ccc;"
/></td></tr>
...
...
This diff is collapsed.
Click to expand it.
html/header_reference.html
+
1
−
1
View file @
420ee255
...
...
@@ -44,7 +44,7 @@
<a
href=
"http://cimg.eu"
><img
src=
"http://cimg.eu/img/CImgLogo2.jpg"
alt=
""
border=
"0"
/></a><br/>
</center>
<center><font
size=
"-1"
color=
"#777777"
>
Latest stable version:
<b><a
href=
"http://cimg.eu/files/CImg_2.4.0.zip"
>
2.4.0
</a></b>
Latest stable version:
<b><a
href=
"http://cimg.eu/files/CImg_2.4.0.zip"
>
2.4.0
</a></b>
Current pre-release:
<b><a
href=
"http://cimg.eu/files/CImg_latest.zip"
>
2.4.1
</a></b>
</font></center>
</td></tr>
<tr
bgcolor=
"#FFFFFF"
><td><hr
noshade
size=
"1"
style=
"border-top: 1px solid #ccc;"
/></td></tr>
...
...
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
register
or
sign in
to comment