You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "NaveenKunapaneni (via GitHub)" <gi...@apache.org> on 2023/04/06 05:37:56 UTC

[GitHub] [commons-imaging] NaveenKunapaneni opened a new pull request, #291: refactored classes IcnsImageParser, PhotometricInterpreterLogLuv, ByteSourceArray, PcxWriter, pivotProcessor, ImageParser, PsdImageParser, PngImageParser for code smells.

NaveenKunapaneni opened a new pull request, #291:
URL: https://github.com/apache/commons-imaging/pull/291

   IcnsImageParser -> Refactored a complex method(writeImage) to multiple smaller components (getImageType(src), writeHeader(bos, imageType), writeImageData(bos, src, imageType), writeMaskData(bos, src, imageType),
    
   PhotometricInterpreterLogLuv ->Introduced a new variable expected_bit_per_sample, 
   
   ByteSourceArray -> Deomposed a complex contional if statement in getBlock method, 
   
   PcxWriter -> Moved a method writePixel32 from PcxWriter to RleWriter class, 
   
   pivotProcessor -> Extracted methods which calculates pivot related values and pushed them to a new class , 
   
   ImageParser -> pushed down a method form the parent class (ImageParser) to child ( PsdImageParser PngImageParser) classes.
   
    I am currently studying on smells and various techniques to refactor smells. This is a small effort on getting an under standing code smells and refactoring them.


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactored classes IcnsImageParser, PhotometricInterpreterLogLuv, ByteSourceArray, PcxWriter, pivotProcessor, ImageParser, PsdImageParser, PngImageParser for code smells. [commons-imaging]

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory closed pull request #291: refactored classes IcnsImageParser, PhotometricInterpreterLogLuv, ByteSourceArray, PcxWriter, pivotProcessor, ImageParser, PsdImageParser, PngImageParser for code smells. 
URL: https://github.com/apache/commons-imaging/pull/291


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactored classes IcnsImageParser, PhotometricInterpreterLogLuv, ByteSourceArray, PcxWriter, pivotProcessor, ImageParser, PsdImageParser, PngImageParser for code smells. [commons-imaging]

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #291:
URL: https://github.com/apache/commons-imaging/pull/291#issuecomment-1868319198

   Closing: No reply from the author.


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] garydgregory commented on pull request #291: refactored classes IcnsImageParser, PhotometricInterpreterLogLuv, ByteSourceArray, PcxWriter, pivotProcessor, ImageParser, PsdImageParser, PngImageParser for code smells.

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #291:
URL: https://github.com/apache/commons-imaging/pull/291#issuecomment-1499085300

   I agree with @kinow 


-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-imaging] kinow commented on a diff in pull request #291: refactored classes IcnsImageParser, PhotometricInterpreterLogLuv, ByteSourceArray, PcxWriter, pivotProcessor, ImageParser, PsdImageParser, PngImageParser for code smells.

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on code in PR #291:
URL: https://github.com/apache/commons-imaging/pull/291#discussion_r1159316289


##########
.idea/misc.xml:
##########


Review Comment:
   Ide files are not included with imaging.



##########
src/main/java/org/apache/commons/imaging/color/ColorConversions.java:
##########
@@ -49,9 +43,9 @@ public static ColorCieLab convertXYZtoCIELab(final double X, final double Y, fin
         double var_Z = Z / REF_Z; // REF_Z = 108.883
 
         // Pivot XÝZ:
-        var_X = pivotXYZ(var_X);
-        var_Y = pivotXYZ(var_Y);
-        var_Z = pivotXYZ(var_Z);
+        var_X = pivotProcessor.pivotXYZ(var_X);
+        var_Y = pivotProcessor.pivotXYZ(var_Y);
+        var_Z = pivotProcessor.pivotXYZ(var_Z);

Review Comment:
   Variables in Imaging may have weird names but these many times match what is described on papers and specifications. Refactorings like these are not really helpful.



-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org