Elvas Tower: ace2bmp - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

ace2bmp An ace to bitmap converter program. Rate Topic: -----

#11 User is offline   pwillard 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 807
  • Joined: 03-March 08
  • Gender:Male
  • Location:Cumming, Ga
  • Simulator:OpenRails
  • Country:

Posted 17 May 2023 - 10:01 AM

I'm finding that it fails to process a number of default files from MSTS...

For *grins*, I mean testing, I decided to batch process the texture folder under routes for USA2.

I ran this script:


$AceProg = 'ace2bmp.exe'

Write-host "If the ACE file has an Alpha Channel, The BMP file generated will not have one."
Write-host "You have been warned"

# Get the current folder path
$currentFolder = Get-Location

# Get all *.s files in the current folder
$fileList = Get-ChildItem -Path $currentFolder -Filter *.ace

# Loop through each file in the list
foreach ($file in $fileList) {
    # Run the ace2bmp.exe executable with the file as input
    $arg1 = $file.fullname
    write-host "Processing: "
    write-host $aceprog $arg1
    & $aceprog $arg1
    Write-host "==============="
}



And here a few files that it *stopped working* on...

chimney.ace
facade6.ace
flatcar.ace
freeway.ace
freight.ace
jp1Car2.ace
jp1Van2.ace


and had near heart failure when processing JP2concwarehse.ace


These are just some examples as I just stopped at this point.

Pete

#12 User is offline   David Webb 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 36
  • Joined: 05-January 20
  • Gender:Male
  • Simulator:OpenRails, ZR
  • Country:

Posted 29 June 2023 - 11:56 PM

With the help of Pete Willard, who tested various changes, the latest version of ace2bmp includes the following improvements:
1. Texture files containing only one image, i.e. missing a set of mipmaps, are now read correctly.
2. If the output bitmap file contains an alpha channel, the file header now contains the extra fields needed to describe the alpha format.
3. A unique temporary filename is used when uncompressing images, reducing the chance of problems during parallel processing.

The program also requires that the input filename contains no spaces, the requirement being a possible indicator of machine intelligence. Non-ascii filename characters may work but are best avoided because of possible conflicts between the UTF8 and UTF16LE character formats.

Information on how to use the program is given in my post of the 27 April.

For anyone who wants to develop the program further, the source code is now on Github (https://github.com/djw-zr/ace2bmp). I'll respond in the case of any major errors, but otherwise chaps and gals, that it.

David.

Attached File(s)



#13 User is offline   pwillard 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 807
  • Joined: 03-March 08
  • Gender:Male
  • Location:Cumming, Ga
  • Simulator:OpenRails
  • Country:

Posted 30 June 2023 - 05:23 AM

I would like to point out that some TEXTURE files from the original MSTS distribution disks *do* have spaces in their name... not many... and these files will need to be handled as special cases.

Pete


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users