[IMAGING] PNG component improved

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[IMAGING] PNG component improved

Sukant Kumar
Hi Fellow Developers,

I contributed to Apache Imaging and cleaned up the PNG component. I also
added scan-line filtering when writing PNG files, that vastly improves
the size of the outputted files. Please look at
https://github.com/apache/commons-imaging/pull/38. It is open for a long
time already.

Please kinow respond to this PR. You said you will look into it but you
are doing other stuff in the same repo.

Regards

Shukant Pal


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [IMAGING] PNG component improved

Bruno P. Kinoshita-2
Hi Sukant,

The project is maintained mainly by volunteers. I am indeed working on other things, including on other issues for [imaging]. Your changes seem interesting, but I would rather work on the other issues first (including the 1.0 release) and postpone reviewing your pull request till that's done.

Again, as a volunteer, I have other issues outside Open Source (namely work, life, education, etc), so can't promise when I will look at your pull request. Other developers may jump in and help. But even then, keep in mind that most of us here are volunteers (:

Cheers
Bruno


ps: did not have time to review your PR today (summer here, going out this weekend), but looks like you renamed .gitignore to _gitignore, deleted files, changed non-public methods to public... these changes are either unnecessary, or need a bit of explanation to detail why it was done... this way other developers and also users will be aware of what to expect of your change for a future release

________________________________
From: Sukant Kumar <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: Saturday, 5 January 2019 2:09 PM
Subject: [IMAGING] PNG component improved



Hi Fellow Developers,


I contributed to Apache Imaging and cleaned up the PNG component. I also

added scan-line filtering when writing PNG files, that vastly improves

the size of the outputted files. Please look at

https://github.com/apache/commons-imaging/pull/38. It is open for a long

time already.


Please kinow respond to this PR. You said you will look into it but you

are doing other stuff in the same repo.


Regards


Shukant Pal


B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��
[��X��ܚX�KK[XZ[�]�][��X��ܚX�P��[[ۜ˘\X�K�ܙ�B��܈Y][ۘ[��[X[�
�K[XZ[�]�Z[
��[[ۜ˘\X�K�ܙ�B

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Fwd: [IMAGING] PNG component improved

Sukant Kumar


Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Sukant Kumar <[hidden email]>
Sent: Friday, January 4, 2019 10:33:46 PM
To: Bruno P. Kinoshita
Subject: Re: [IMAGING] PNG component improved

Hi Kinow,

Okay, I understand that you are working on other stuff. Total okay with
it, I just wanted a reply. As you have raised the topic of talking of my
changes, I could explain a bit of what I did.

The reason that I made some methods public was so that some applications
can read low-level structure of PNG files. I think that exposing the
PngChunk will allow 3rd party apps to get individual chunks.

Some issues I found were that PngImageParser was just too (by way too)
long. It should've been divided into more lower-level objects to make it
more understandable. That's what I've done using ChunkReader and
ChunkLoader.

Again, there was a class ImageHeader inside PngImageParser that was a
direct copy of PngChunkIhdr, except it was read-write. I don't think
that's what you want - having duplicate code.

I would divide my changes as:

1. ChunkLoader (public) is used for loading one chunk from an
InputStream. Chunks can be filtered by passing a ChunkSelector object.
The static method ChunkLoader.run returns a result in the form of a
ChunkLoader object. The ChunkLoader contains three things - the
resultant Chunk, CRC, and if the chunk is the last in the file.

2. ChunkReader reads all the chunks in an InputStream. It replaces the
readChunks (and related methods) in PngImageParser.

3. BitParser - really what is a BitParser? I renamed it to PixelParser
cause it read individual pixel values from a PNG IDAT chunk. The first
time I read the BitParser class, I really ended up scratching my head.
Then I realized it actually reads pixels from a PNG raw image data.

4. FilterType in top-level png package - I think the whole filtering
stuff should be in one object instead of "embedding" it into
ScanExpediter. I created a driver object called "AdaptiveFilter". I
removed the five adaptive filter type classes and put everything into
the AdaptiveFilter.Filter and related classes. I also had to change some
test cases to use the AdaptiveFilter class.

5. PngWriter.DataCompressor feeds raw data and outputs compressed data.

6. PngWriter now uses scan-line filtering (PAETH-only) during write.

Thanks

Shukant

PS: I'm a newbie so pls be patient with me. Please reply to this
whenever possible.

This is my first open-source contribution. I don't see any issues on
GitHub. Please give me some references to the issues so that I can
contribute to active parts in this project.

On 1/4/19 8:34 PM, Bruno P. Kinoshita wrote:

> Hi Sukant,
>
> The project is maintained mainly by volunteers. I am indeed working on other things, including on other issues for [imaging]. Your changes seem interesting, but I would rather work on the other issues first (including the 1.0 release) and postpone reviewing your pull request till that's done.
>
> Again, as a volunteer, I have other issues outside Open Source (namely work, life, education, etc), so can't promise when I will look at your pull request. Other developers may jump in and help. But even then, keep in mind that most of us here are volunteers (:
>
> Cheers
> Bruno
>
>
> ps: did not have time to review your PR today (summer here, going out this weekend), but looks like you renamed .gitignore to _gitignore, deleted files, changed non-public methods to public... these changes are either unnecessary, or need a bit of explanation to detail why it was done... this way other developers and also users will be aware of what to expect of your change for a future release
>
> ________________________________
> From: Sukant Kumar <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Sent: Saturday, 5 January 2019 2:09 PM
> Subject: [IMAGING] PNG component improved
>
>
>
> Hi Fellow Developers,
>
>
> I contributed to Apache Imaging and cleaned up the PNG component. I also
>
> added scan-line filtering when writing PNG files, that vastly improves
>
> the size of the outputted files. Please look at
>
> https://github.com/apache/commons-imaging/pull/38. It is open for a long
>
> time already.
>
>
> Please kinow respond to this PR. You said you will look into it but you
>
> are doing other stuff in the same repo.
>
>
> Regards
>
>
> Shukant Pal
>
>
> B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��
> [��X��ܚX�KK[XZ[�]�][��X��ܚX�P��[[ۜ˘\X�K�ܙ�B��܈Y][ۘ[��[X[�
> �K[XZ[�]�Z[
> ��[[ۜ˘\X�K�ܙ�B
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Fwd: [IMAGING] PNG component improved

Sukant Kumar
In reply to this post by Bruno P. Kinoshita-2


Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Shukant Pal <[hidden email]>
Sent: Friday, January 4, 2019 10:33:45 PM
To: Bruno P. Kinoshita
Subject: Re: [IMAGING] PNG component improved

Hi Kinow,

Okay, I understand that you are working on other stuff. Total okay with
it, I just wanted a reply. As you have raised the topic of talking of my
changes, I could explain a bit of what I did.

The reason that I made some methods public was so that some applications
can read low-level structure of PNG files. I think that exposing the
PngChunk will allow 3rd party apps to get individual chunks.

Some issues I found were that PngImageParser was just too (by way too)
long. It should've been divided into more lower-level objects to make it
more understandable. That's what I've done using ChunkReader and
ChunkLoader.

Again, there was a class ImageHeader inside PngImageParser that was a
direct copy of PngChunkIhdr, except it was read-write. I don't think
that's what you want - having duplicate code.

I would divide my changes as:

1. ChunkLoader (public) is used for loading one chunk from an
InputStream. Chunks can be filtered by passing a ChunkSelector object.
The static method ChunkLoader.run returns a result in the form of a
ChunkLoader object. The ChunkLoader contains three things - the
resultant Chunk, CRC, and if the chunk is the last in the file.

2. ChunkReader reads all the chunks in an InputStream. It replaces the
readChunks (and related methods) in PngImageParser.

3. BitParser - really what is a BitParser? I renamed it to PixelParser
cause it read individual pixel values from a PNG IDAT chunk. The first
time I read the BitParser class, I really ended up scratching my head.
Then I realized it actually reads pixels from a PNG raw image data.

4. FilterType in top-level png package - I think the whole filtering
stuff should be in one object instead of "embedding" it into
ScanExpediter. I created a driver object called "AdaptiveFilter". I
removed the five adaptive filter type classes and put everything into
the AdaptiveFilter.Filter and related classes. I also had to change some
test cases to use the AdaptiveFilter class.

5. PngWriter.DataCompressor feeds raw data and outputs compressed data.

6. PngWriter now uses scan-line filtering (PAETH-only) during write.

Thanks

Shukant

PS: I'm a newbie so pls be patient with me. Please reply to this
whenever possible.

This is my first open-source contribution. I don't see any issues on
GitHub. Please give me some references to the issues so that I can
contribute to active parts in this project.

On 1/4/19 8:34 PM, Bruno P. Kinoshita wrote:

> Hi Sukant,
>
> The project is maintained mainly by volunteers. I am indeed working on other things, including on other issues for [imaging]. Your changes seem interesting, but I would rather work on the other issues first (including the 1.0 release) and postpone reviewing your pull request till that's done.
>
> Again, as a volunteer, I have other issues outside Open Source (namely work, life, education, etc), so can't promise when I will look at your pull request. Other developers may jump in and help. But even then, keep in mind that most of us here are volunteers (:
>
> Cheers
> Bruno
>
>
> ps: did not have time to review your PR today (summer here, going out this weekend), but looks like you renamed .gitignore to _gitignore, deleted files, changed non-public methods to public... these changes are either unnecessary, or need a bit of explanation to detail why it was done... this way other developers and also users will be aware of what to expect of your change for a future release
>
> ________________________________
> From: Sukant Kumar <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Sent: Saturday, 5 January 2019 2:09 PM
> Subject: [IMAGING] PNG component improved
>
>
>
> Hi Fellow Developers,
>
>
> I contributed to Apache Imaging and cleaned up the PNG component. I also
>
> added scan-line filtering when writing PNG files, that vastly improves
>
> the size of the outputted files. Please look at
>
> https://github.com/apache/commons-imaging/pull/38. It is open for a long
>
> time already.
>
>
> Please kinow respond to this PR. You said you will look into it but you
>
> are doing other stuff in the same repo.
>
>
> Regards
>
>
> Shukant Pal
>
>
> B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��
> [��X��ܚX�KK[XZ[�]�][��X��ܚX�P��[[ۜ˘\X�K�ܙ�B��܈Y][ۘ[��[X[�
> �K[XZ[�]�Z[
> ��[[ۜ˘\X�K�ܙ�B
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>