Closed GoogleCodeExporter closed 8 years ago
Sorry do not use the above image. try this one:
Original comment by prata...@gmail.com
on 15 Nov 2011 at 8:45
Attachments:
I think, this happens with images smaller than 125kb.
Original comment by prata...@gmail.com
on 15 Nov 2011 at 8:46
It works fine for me.
Could you try to run the attached test-case on your machine?
Original comment by mor...@nobel-joergensen.com
on 15 Nov 2011 at 9:07
Attachments:
Here is the link: http://cqpt.co/rBPYkk
the answer is pratap
I will run a test in my local machine
Original comment by prata...@gmail.com
on 15 Nov 2011 at 9:29
Also please provide what version of Java and what OS you are using.
Original comment by mor...@nobel-joergensen.com
on 15 Nov 2011 at 9:36
Java 6 and Linux (Amazon Linux AMI)
Original comment by prata...@gmail.com
on 15 Nov 2011 at 9:39
I need the exact java version. (Type 'java -version' in the terminal)
Original comment by mor...@nobel-joergensen.com
on 15 Nov 2011 at 9:41
Hey, tested it locally. It works perfect. But when i do it in production env,
it gets messed up. Any clue as to what might be happening?
Original comment by prata...@gmail.com
on 15 Nov 2011 at 9:47
1.6.0_20
Original comment by prata...@gmail.com
on 15 Nov 2011 at 9:48
1.6.0_20 should be ok. (It is the same java version in your production
environment?)
One thing I notised in your code is that you use double for width and height.
The library only supports ints. Maybe try to write out the dimensions to
System.out (or to a log-file) before you resize.
Original comment by mor...@nobel-joergensen.com
on 15 Nov 2011 at 9:51
Actually i pass int (i convert the double at some point)
Original comment by prata...@gmail.com
on 15 Nov 2011 at 10:17
I think it is related to this issue:
http://code.google.com/p/java-image-scaling/issues/detail?id=18#c7
Check out the workaround by marcin
Original comment by mor...@nobel-joergensen.com
on 15 Nov 2011 at 10:34
Will check, thanks a ton for your help.
Original comment by prata...@gmail.com
on 15 Nov 2011 at 11:20
http://stackoverflow.com/questions/4386446/problem-using-imageio-write-jpg-file
I guess you are right the problem is with ImageIO
Original comment by prata...@gmail.com
on 15 Nov 2011 at 12:22
Great :) I'll close the issue then
Original comment by mor...@nobel-joergensen.com
on 15 Nov 2011 at 12:41
Just checked, it is working great. BTW thanks a ton for the support and help.
Original comment by prata...@gmail.com
on 15 Nov 2011 at 1:14
Original issue reported on code.google.com by
prata...@gmail.com
on 15 Nov 2011 at 8:40