i using imageresizer imageresizing.net , having problem transparency. when resize png images, losing transparency , ending black background.here code, if me appreciated.
var imagejob = new imagejob(); imagejob.instructions = new instructions(); imagejob.instructions.width = 400; imagejob.instructions.height = 300; imagejob.instructions.mode = imageresizer.fitmode.max; imagejob.instructions.format = "png"; imagejob.instructions.outputformat = imageresizer.outputformat.png; imagejob.source = instream; imagejob.dest = outstream; imagebuilder.current.build(imagejob); finalwidth = convert.toint32(imagejob.finalwidth); finalheight = convert.toint32(imagejob.finalheight); bytestosavetodb = outstream.toarray();
for reading this, have found answer. code posted works fine , keeps transparency, using code resizing upon upload. resizing image again when displaying image had not realised, , when displaying image using old code resize did not maintain transparency. resizing twice , old code causing issue, code posted works fine.
Comments
Post a Comment