Closed MichaelQuint closed 8 years ago
Also, here is the code im using to produce the results.
KalikoImage img = null;
using (var ms = new MemoryStream(picture.Image))
{
img = new KalikoImage(ms);
img.BlitFill(watermark);
}
byte[] image = null;
using (MemoryStream memoryStream = new MemoryStream())
{
img.SaveJpg(memoryStream, 99);
image = memoryStream.ToArray();
}
Thank you for the bug report! I will look into why this happens.
The issue seems to be related to the DPI resolution of the images. An image with for instance 300 DPI results in the same error as seen in the attached images, while the exact same image but in 96 DPI produces the correct result. I hope to have a fix for this soon.
Awesome, I appreciate the support!
I've created a new branch where all constructors should be DPI-independent. It would be great if you can verify if this solves your problem, thanks!
The new branch is: https://github.com/fschultz/NetImageLibrary/tree/dpi-fix
Yessir, that did the trick. So converting the Image to Bitmap fixes this? very intereting
Great! Yes, it seems that wrapping it as Bitmap is the easiest way to keep everything intact and in the same time resetting the DPI-information.
I'm getting strange issues with the BlitFill method on high resolution images, im using the method to watermark the images on my website with a watermark image ive created. I followed the tutorial to do so, for smaller images it works fine, for others not so much. Ive attached the results below:
image "7.jpg" ( the last one ) is correct.