Skip to content

Conversation

@jodygarnett jodygarnett changed the title JAI to ImageN Rename of classes and constants ImageIO-Ext update for JAI to ImageN Rename of classes and constants Sep 26, 2025
Copy link
Member

@aaime aaime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks pretty good, there are a few notes below.

Also done a "git grep jai", the bulk of the JAI references would go away if ParameterBlockJAI was to be renamed into ParameterBlockImagen, but there are a few other cases too (e.g., the licenses refer to JAI).

* By default, ImageN uses hardware accelerated methods when available. For example, it make use of
* MMX instructions on Intel processors. Unluckily, some native method crash the Java Virtual
* Machine under some circumstances. For example on JAI 1.1.2, the {@code "Affine"} operation on
* Machine under some circumstances. For example on ImageN 1.1.2, the {@code "Affine"} operation on
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When JAI was used with a version number, the migration does not look great. I'm guessing these need to be taken care of manually.
Just noting this one, there are other cases like this one in this diff.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting case, I will add that to script.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action:

  • Replaced with ImageN 1.1.2 with ImageN to cover this case
  • Replaced: @since ImageN 1.1.2 with @singe ImageN 0.4.0 as the other example

public synchronized static void setNativeAccelerationAllowed(final String operation,
final boolean allowed,
final JAI jai)
final ImageN jai)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable "jai" should probably be "imagen". There are other cases of this around.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking, I expect those may need to be cleaned up manually? Or towards the end of the script with a regex (thus far I have held off on regex).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action: I have updated script to replace these, with pretty good success so far.

@jodygarnett jodygarnett merged commit 2af0686 into master Oct 5, 2025
0 of 6 checks passed
@jodygarnett jodygarnett deleted the jai-rename branch October 5, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants