Open GoogleCodeExporter opened 9 years ago
Sorry for the late response.
You're quite correct in saying that the exception message "Could not open
output file." is lacking.
Since this seems to be a case where more information about the original
exception would be useful in finding out what is causing the problem, I'll open
another issue to include the original exception message for this type of error.
As to your original problem with writing to a file from Tomcat, I would suspect
a file permissions issue which is preventing the file from being written to the
../bin directory.
Since you mention that using the `ImageIO.write` method resulting in the image
being written, I just want to verify one thing:
Is the filepath for "test_target.jpg" exactly the same as the filepath for
`targetFile`?
Also, have you had success when you try to use the `Thumbnails.toFile` method
with the destination specified by the `targetFile` with any success?
Original comment by coobird...@gmail.com
on 9 Jun 2012 at 6:33
[deleted comment]
[deleted comment]
[deleted comment]
Hi, I read your comment today.
--------------------------------------------
Is the filepath for "test_target.jpg" exactly the same as the filepath for
`targetFile`?
Yes, but Thumbails.toFile method throws exception.
---------------------------------------------
I think permission issue is not a cause of exception. Result of file creation
and writing operation on same directory "%tomcat%\bin" is successful.
Original comment by sirius...@gmail.com
on 3 Jul 2012 at 7:22
I have been facing the same problem. Any solution?
Original comment by mighty...@gmail.com
on 2 Aug 2012 at 11:14
Hi,
I noticed, that if the image already exists and I am overwriting to it, then I
dont get error..
File thumbnailFile = new File(thumbnailPath);
Thumbnails.of(thumbnailFile)
.size(160, 160)
.toFile(thumbnailFile);
Original comment by mighty...@gmail.com
on 2 Aug 2012 at 11:27
[deleted comment]
Hi,
I noticed, that if the image already exists and I am overwriting to it, then I
dont get error..
File thumbnailFile = new File(thumbnailPath+fileName);
Thumbnails.of(thumbnailFile)
.size(160, 160)
.toFile(thumbnailFile);
if thumbnailFile is a non existent file, it doesnt work.
if thumbnailFile is already an image file, it is converted to the thumbnail.
Original comment by mighty...@gmail.com
on 2 Aug 2012 at 11:29
Hi mightyrsm,
Sorry for the delay in the reply.
> if thumbnailFile is a non existent file, it doesnt work.
Could this just mean that the source image doesn't exist, so the file cannot be
opened to create the thumbnail?
Is it possible to get a stacktrace which is given when this problem occurs?
Original comment by coobird...@gmail.com
on 2 Sep 2012 at 4:46
Hi sirius2kk,
It has been a while, but just as a small update, I'll be changing the way the
`IOException` is handled in `FileImageSink.write()` so that it isn't rewritten
by the non-informative `new IOException` in the next release of Thumbnailator.
I'm still not quite sure about the Tomcat issue... I'll have to take a closer
look to see what's going on.
Original comment by coobird...@gmail.com
on 2 Sep 2012 at 4:56
Original comment by coobird...@gmail.com
on 8 Oct 2012 at 5:27
Original comment by coobird...@gmail.com
on 27 Dec 2012 at 4:06
A change has been made in Thumbnailator 0.4.3 to give a more detailed message
when an exception is thrown from `FileImageSink.write()`.
Original comment by coobird...@gmail.com
on 10 Feb 2013 at 3:51
Original issue reported on code.google.com by
sirius...@gmail.com
on 22 May 2012 at 2:18Attachments: