you may simply add filters to image) http://zennolab.com/discussion/thre...henijami-watermark-i-prochie-nishtjaki.18286/ check urlis it possible to change image pixels that i'm uploading, I would like to be able to randomize them so they're not detected as the same image
ok thanksyou may simply add filters to image) http://zennolab.com/discussion/thre...henijami-watermark-i-prochie-nishtjaki.18286/ check url
from what i understand this will resize the image and add a watermark, but what if i want to randomly resize it to a new width/height each time? can i insert a variable into the C# code ?you may simply add filters to image) http://zennolab.com/discussion/thre...henijami-watermark-i-prochie-nishtjaki.18286/ check url
//Reduse image with saving its proportion
Func<System.Drawing.Image, int, int, System.Drawing.Image> imgReduse = (System.Drawing.Image _img, int _width, int _height) => {
var _rx = (double)_img.Width/_width;
var _ry = (double)_img.Height/_height;
var _ratio = Math.Min(_rx, _ry);
var _newW = (int)(_img.Width/_ratio);
var _newH = (int)(_img.Height/_ratio);
return new System.Drawing.Bitmap(_img, _newW, _newH);
};
string imagePath = @"D:\downloads\photo_51465.jpg";
// Create image file
System.Drawing.Image tempimg = System.Drawing.Image.FromFile(imagePath);
System.Drawing.Image img = imgReduse(tempimg, 300, 100);
// Save new image
img.Save(@"D:\downloads\small_photo_51465.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
tempimg.Dispose();
img.Dispose();