convert image_reader public interface to use CamelCase to match the rest of codebase
This commit is contained in:
@@ -42,21 +42,21 @@ inline boost::optional<std::string> type_from_bytes(char const* data, size_t siz
|
||||
return result_type();
|
||||
}
|
||||
|
||||
std::unique_ptr<image_reader> get_image_reader(char const* data, size_t size)
|
||||
std::unique_ptr<ImageReader> getImageReader(char const* data, size_t size)
|
||||
{
|
||||
boost::optional<std::string> type = type_from_bytes(data,size);
|
||||
if (type)
|
||||
{
|
||||
if (*type == "png")
|
||||
{
|
||||
return std::make_unique<png_reader<boost::iostreams::array_source>>(data, size);
|
||||
return std::make_unique<PngReader<boost::iostreams::array_source>>(data, size);
|
||||
}
|
||||
else if (*type == "jpeg")
|
||||
{
|
||||
return std::make_unique<jpeg_reader<boost::iostreams::array_source>>(data, size);
|
||||
return std::make_unique<JpegReader<boost::iostreams::array_source>>(data, size);
|
||||
}
|
||||
}
|
||||
throw image_reader_exception("image_reader: can't determine type from input data");
|
||||
throw ImageReaderException("ImageReader: can't determine type from input data");
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user