Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
Fixed bug in sRGBtoRGB
Browse files Browse the repository at this point in the history
  • Loading branch information
dahtah committed Aug 8, 2015
1 parent beb75d9 commit cd12c42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,5 @@ importFrom(plyr,rename)
importFrom(png,readPNG)
importFrom(png,writePNG)
importFrom(stringr,str_match)
importFrom(stringr,str_split)
useDynLib(imager)
2 changes: 1 addition & 1 deletion inst/include/CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -19830,7 +19830,7 @@ namespace cimg_library_suffixed {
const Tfloat
sval = (Tfloat)*ptr,
nsval = (sval<0?0:sval>255?255:sval)/255,
val = (Tfloat)(nsval<=0.04045f?nsval/12.92f:std::pow((nsval + 0.055f)/(1.055f),2.4f));
val = (Tfloat)(nsval<=0.04045f?nsval/12.92f:std::pow((float) (nsval + 0.055f)/(1.055f),2.4f));
*ptr = (T)(val*255);
}
return *this;
Expand Down

0 comments on commit cd12c42

Please sign in to comment.