Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 17945

ImageIO write load issue

$
0
0
    BufferedImage image = generateCaptchaImage(engine, cycle, output, height, width, fontSize, noOfBoxesToBeDrawn,            noOfLinesToBeDrawn, alphabetCount, letterWidth, background, text);    HttpServletResponse response = cycle.getRequestContext().getResponse();    response.setContentType("image/jpeg");    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(response.getOutputStream());    encoder.encode(image);

replaced above code with below, but my image is not getring rendered on htmp page

    BufferedImage image = generateCaptchaImage(engine, cycle, output, height, width, fontSize, noOfBoxesToBeDrawn,            noOfLinesToBeDrawn, alphabetCount, letterWidth, background, text);    HttpServletResponse response = cycle.getRequestContext().getResponse();    response.setContentType("image/jpeg");    ImageIO.write(image,"jpg",response.getOutputStream());

upgraded jdk from 1.6 to 1.8 and and changed some existing java code with ImageIO codeafter that captcha image is not getting shown.


Viewing all articles
Browse latest Browse all 17945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>