Skip to content

Unexpected behaviour when using toFile without an extension matching output format #66

@GoogleCodeExporter

Description

@GoogleCodeExporter
Take this small code block:

File inputFile = new File("...");
File outputFile = File.createTempFile("thumbnail", null);
Thumbnails.of(inputFile).size(100,100).outputFormat("jpg").toFile(outputFile);

My expected result is that outputFile contains the thumbnail, which I think is 
reasonable and in line with the javadocs of toFile. However, Thumbnailator 
writes the thumbnail to a new file with .jpg appended, which isn't exposed 
anywhere, so my code in principle has no way of accessing the thumbnail without 
knowledge of the internal implementation.

Obviously this is easy enough to work around by creating the temp file with a 
.jpg extension, but this really shouldn't be needed.

Original issue reported on code.google.com by bjmac...@gmail.com on 19 Feb 2014 at 8:15

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions