VXAce Replicating color "hue" transformations of battler images

So, this is a longshot, but I'm going to ask...

I'm thinking about making a big, fat procedurally generated Wiki article page of our bloated VX Ace game's various enemies and their stats. We've got the big, fat dump file of VX Ace database content, we've loaded it into a nice SQL database, and we want to use some form of reporting to output the marked up Mirahaze wiki source code. The one snag is images.

Every enemy has its own battler, all of which are stored in PNG files. But a significant number (23%) are put through color transformations using VX Ace's "Hue" slider control. The setting on this control is stored internally in the VX Ace database as an integer ranging from 0 for no transformation to a maximum of 360 (or that's as high as we've set it, anyway), apparently moving in increments of 10.

What I would like to do is programmatically edit and save the PNG files replicating the color transformations, probably using GIMP scripting/macros...

Trouble is, I have no earthly idea what kind of image transformation the VX Ace Hue control is doing, so I don't know where to begin translating the list of filenames and "Hue" values into commands for image editing.

Anybody have the slightest idea where to begin figuring out how to do this?
All data is pre-loaded by the game at startup, so it would be possible to do this without additional libraries.
Specifically, the monsters are read from the $data_enemies variable

Example:
Code:
#Methods:
#enemy.name
#enemy.battler_name
#enemy.battler_hue
count = 1
while count < 3
   enemy = $data_enemies[count]
   p "Monster: #{enemy.name}" # Return in Console
   count += 1
end

Knowing the format, it wouldn't be difficult to translate all of that into a batch String, but it takes time and dedication to write the instruction format for SQL.
Basically, you would write a text file line by line already prepared to be used as the SQL file, or if you prefer, some ready-made format to be sent directly to the Wiki.
All data is pre-loaded by the game at startup, so it would be possible to do this without additional libraries.
Specifically, the monsters are read from the $data_enemies variable

Example:
Code:
#Methods:
#enemy.name
#enemy.battler_name
#enemy.battler_hue
count = 1
while count < 3
   enemy = $data_enemies[count]
   p "Monster: #{enemy.name}" # Return in Console
   count += 1
end

Knowing the format, it wouldn't be difficult to translate all of that into a batch String, but it takes time and dedication to write the instruction format for SQL.
Basically, you would write a text file line by line already prepared to be used as the SQL file, or if you prefer, some ready-made format to be sent directly to the Wiki.

I may not be being totally clear here. We're talking about a page on an external website using the wikia format, not an in game menu of information. The SQL is done. The data has already been extracted by script. The only issue there is decoding some of the references in the various "features" tables for some of the other objects.

The process of using some sort of reporting engine to turn a SQL query against this now existing database into wiki source code is going to be tedious, but doable. But what the database contains for monster images is a filename and (where appropriate) this Hue number.

What I want to do is upload a set of PNG files to that wiki and reference them as an embedded image on the wiki page. That's easy for all the battlers that aren't transformed by the hue control. I was looking for a way to replicate the way VX Ace changes their coloration in another image editing software outside of VX Ace entirely.

What I THINK you're proposing is iterating through displaying the images in the game interface using scripting. If it were a small number of images, doing that and screenshotting would work, but I've got 226 of the things.

So I was hoping what VX Ace is doing to the images can be replicated in an editor.
Hue transformations are standard mathematics.
Photoshop for example has a slider with values from -180 to +180 for doing such a transformation.

there should be similar programs for web-based painting functions, and then you only need to call such a function together with the image data from the SQL database.

unfortunately I can't tell you how to do that, but I hope this helps you searching for the right literature on the web.
Sorry, I misunderstood. I thought you needed help to start the extraction, and then we would move on to the step of copying the image, changing its name and altering the HUE.
You can still use GIMP, the problem is that the slider for setting the hue in RMVXA is somewhat confusing. So you'll need to use math to solve it:
Code:
(hue*2)-360
hue /= 3.6 // Convert to the format decimal (0, 15, 35, 60 ... 100)
hue /= 360 // Convert to the format float (0, 1.5, 3.5 6.0 ... 1.0)

I would prefer to extract the enemies directly from the game using a script following the formula I showed:
Ruby:
# Extract enemies database to PNG files
# License: Free
# Author: DevRPG2k (DevWithCoffee)
# Requires Magick to be installed: https://imagemagick.org/download/
#
# Remove this script from your project after use, as it not only slows down
# the startup but also closes the game window after generating the images
#

enemies = load_data('Data/Enemies.rvdata2') # Read the file directly
count = 0
total = enemies.length-1 # Check the total monster count
dir = 'Enemies-Extracted'
Dir.mkdir(dir) if !File.exist?(dir)

while count < total
  count += 1
  en = enemies[count] # Get data enemie  name = en.name # Get name in database
  name = en.name # Get name in database
  path_file = 'Graphics/Battlers/'+en.battler_name+'.png' # Get path of file
  prefix = count.to_s.rjust(3,'0')
  # Ignore if the PNG file is on RTP
  if !File.exist?(path_file)
    p 'Enemy ['+prefix+':'+name+'] is using an RTP graphic!!!'
    next
  end

  hue = (en.battler_hue*2)-360 # Get the hue and sync it with the percentage
  hue = hue / 3.6 # Convert to percentage
  # Remove negative sign to show in log (does not affect Magick)
  hue = hue.to_i.to_s # Convert to String
 
  system( 'start /min magick "'+path_file+'"'+
          ' -modulate 100,100,'+hue+
          ' "'+dir+'/'+prefix+'-'+name+'.png"' )

  # Log in console
  if File.exist?(path_file)
    p 'Created Enemy ['+prefix+':'+name+'] - hue: '+hue+'%'
  else
    p 'ERROR! Enemy ['+prefix+':'+name+'] - Failed to create image!'
  end
end

If you are using any monster assets that are still being pulled from the RTP, import them into your project.
See the result:
VXA-ExtractMonstersToPNG.png
arte-johnson-very-interesting.gif


Thank you both for the pointers!
I looked at GIMP and it also has a command line, in its case it's GEGL since version 2.1:
Code:
gegl -i input.png -o output.png -- gegl:hue-saturation hue=180

Then all you would need to do is edit the script line

Original thread: https://forums.rpgmakerweb.com/threads/replicating-color-hue-transformations-of-battler-images.183711/