kpouer commented on PR #271:
URL: https://github.com/apache/commons-imaging/pull/271#issuecomment-1397599109

   Hi @kinow,
   About the new methods, it is utility that get various information about the 
image. Some format are not detected only from their data and the file extension 
is necessary. It was of course working with tmp files, but not with byte arrays.
   I took inspiration of the equivalent method taking an InputStream and a 
filename, for example
   There was a 
   
   public static ICC_Profile getICCProfile(final InputStream is, final String 
fileName)
   
   Then I created
   public static ICC_Profile getICCProfile(final String fileName, final byte[] 
bytes) (the parameter order is not the same but it follows the constructor 
parameter orders of the ByteSourceArray class (however when rereading I think 
that Imaging class should always have the same parameter orders, it would be 
easier to understand.
   I could have used getICCProfile(ByteSource) but the method was protected 
then I should have changed it's visibility.
   
   About the troubleshooting I'll update the branch in order to save tmp files 
for failed test.
   
   @garydgregory I don't think it will take a lot of memory as images are 
processed one by one, I think it should store something like 2 or 3 time the 
same image during some tests, then the memory is released to the GC to process 
the next image. And test images do not seem to be huge. However I am interested 
but not sure about what you mean by tested in containers. Do I have a way to 
test it to validate ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to