eLynx SDK
v3.3.0 C++ image processing API reference |
Here is a fun processing to simulate an old fashion photo style:
const char * filenameIn = "../../datas/docRef/lighthouse.png"; cout << ".Loading RGBub image file: " << filenameIn << endl; ImageVariant image(filenameIn); bool bSuccess = image.IsValid(); cout << ".Resize image to 320x200" << endl; const uint32 w = 200; const uint32 h = 320; bSuccess = image.Resample(w,h); cout << ".Sharpen image as it has been reduced" << endl; bSuccess = image.ApplySharpen(); cout << ".Change the hue of image to sepia" << endl; const double hue = 0.10; const double saturation = 0.54; bSuccess = image.Colorize(hue, saturation); cout << ".Add a white border to look like a paper photo" << endl; const uint32 border = 8; bSuccess = image.AddBorder(border,border,border,border,false); const char * filenameOut = "../../datas/output/lighthouse_oldStyle.png"; cout << ".Save image as " << filenameOut << " "; bSuccess = image.Save(filenameOut); cout << (bSuccess? "successfull" : "failed") << endl;
Output:
.Loading RGBub image file: ../../datas/docRef/lighthouse.png .Resize image to 320x200 .Sharpen image as it has been reduced .Change the hue of image to sepia .Add a white border to look like a paper photo .Save image as ../../datas/output/lighthouse_oldStyle.png successfull
![]() |
lighthouse_oldStyle.png