FS2004 Imagetool mistery!!! (SOLVED)

#1
Hello lads

I am trying to understand how on hearth can you resize an image after being converted into the special 8 bit format with alpha that only Imagetool can handle (AFAIK)?

I was studying the FS2004 SDK along with c1xx_dg gauge (by Jim Robinson) and he managed to resize a former 8 bit with alpha with a native 2^2 power size image into a 260 x 260 pixels with loosing the format!!!

I am doing an educated guess here; I am assuming the former images perhaps were designed in a 252 x 252 pixel "enviroment" (I really can say where he made them: in paint, corel or photoshop).

I am getting good results without using the drawing order suggested in the SDK (see the code below; wich is not included in order to get this result):
HTML:
          <!-- ======================= Altimeter Shadow ============================= -->
            <Element>
                <Position X="0" Y="0"/>
                <Image Name="429_altimeter_shadow_alpha.bmp" Alpha="Yes"/>
            </Element>
          <!--======================= Altimeter Highlight ============================= -->
            <Element>
                <Position X="0" Y="0"/>
                <Image Name="429_altimeter_highlight_alpha.bmp" Alpha="Yes"/>
            </Element>
First, the original front card including all mambo yambo with highlights:
429_altimeter.jpg


As you can see, I am not using
429_altimeter_highlight_alpha.bmp or 429_altimeter_shadow_alpha.bmp images (not shown)

Now, the result in the simulator:
Immagetool_mistery_01.jpg


Finally, Jim's gauge within the sim (fact: all images -including the shadow and highlights- are 260 x 260 pixels; I'm not kidding): :confused: :confused: :confused:
Immagetool_mistery_02.jpg


Any clues on how to resize the images?

In advance, thank you.
Sergio
 
#3
I was studying the FS2004 SDK along with c1xx_dg gauge (by Jim Robinson) and he managed to resize a former 8 bit with alpha with a native 2^2 power size image into a 260 x 260 pixels with loosing the format!!!
Those "powers of two" rules don't apply to gauge .bmps and I didn't resize someone else's gauge .bmps, I made them myself in Photoshop from the ground up. No particular reason for the 260 x 260 px size, that's just what I happened to start with for that gauge.
 
#4
Hello Jim

When I said "he managed to resize a former..."; I really was pointing that you did something I can't do my friend; nothing else. All I said was taking in mind your hard work and furthermore, admiring it; I love very much this particular gauge of yours. I was not meant to offend you, sorry if I did. :eek: :eek: :eek:

I am sure this is a misunderstanding: Peace, brother!

Now, retaking the main point: How on earth you did it? I want to work and add an alpha channel to an image which dimensions are 750 x 750 pixels.
Imagetool and DXTBmp can only work with native image sizes (as far as I know). For example, if I open the highlight (a pure black image with an 8 bit alpha) for the altimeter, both programs resize it to the nearest "standard" size; let's say 512 x 512. This ruins my attempt to use it in my gauge.

Convert to 32 bit (Imagetool), resize (Photoshop), and convert back to 8 bit (Imagetool).
Hi Luka, that's the point; my images are not in any power of 2. I did what you kindly suggested and photoshop is not able to convert an 8 bit image with an embedded alpha channel. If there's a photoshop script to do this; I simply don't know it.

In any event, thank you all for your help.
All the best,
Sergio.
:)
 

Luka

Resource contributor
#5
Hi Luka, that's the point; my images are not in any power of 2. I did what you kindly suggested and photoshop is not able to convert an 8 bit image with an embedded alpha channel. If there's a photoshop script to do this; I simply don't know it.
Use Imagetool for 8 to 32bit conversion before editing and back to 8bit after editing (Menu: Image->Format->*-bit). Photoshop is only for edit/resize 32-bit image.

And, as @JRobinson says, don't worry about the ^2 rule. Gauge image may have any dimensions (e.g. 157x223).
 
#7
Hi Luka

I think I nailed it. I was under a misconception; the highlight image was resised because I used DXTbmp to import the alpha channel. That's why I didn't realized that Imagetool doesn't care about image sizes like DXTbmp! :D

I am playing a little bit with Imagetool and right now I still can find how to import an alpha channel like DXTbmp does. Nevertheless I "found" a workaround; for sure, it's not the best way to achieve this but here we go:

1.- In Photoshop I create a 1024 x 1024 pixel document, large enough to house my 750 x 750 pixel image:
Altimeter_ALPHA_preparations_01.jpg


2.- Since I am interested in the alpha channel itself; I pasted the highlights above a white background within the same document. Then, I moved the
highlight layer and aligned it perfectly in the top left corner. The following 24 bit image will be my alpha channel:
Altimeter_ALPHA_preparations_02.jpg


3.- Now, the Image 429_altimeter_highlight_alpha.bmp will be a pure black (RGB 0,0,0) saved as a 24 bit bitmap.
4.- Using DXTbmp, I open 429_altimeter_highlight_alpha.bmp and import the highlights in the image above and save it again. Now the image
429_altimeter_highlight_alpha.bmp has an alpha channel.
5.- Next step, is to open with photoshop the "new" version of the 429_altimeter_highlight_alpha.bmp (now is a 32 bit image) and crop the image to get
the size I want: 750 x 750 pixels.
6.- Finally; using Imagetool, I convert the 32 bit image to the 8 bit with alpha format and save.
7.- Voila! Now 429_altimeter_highlight_alpha.bmp has the 8 bit with alpha channel format with all desired dimensions.

Of course, I will experiment with alpha channels and opacity to get the result I need.

Jim and Luka, thank you very much!
Cheers,
Sergio.
 
Last edited:
#8
Depending on which version of PS you're using you should just be able to export a 32 bit .bmp from PS any size with the alpha embedded. Then just open that in Imagetool and do the 8-bit conversion. In PS 7 and later you can manipulate the alpha pretty much like a layer, pull up the channels palette (Windows > Channels) then click on the Alpha1 channel and go for it. If there isn't an Alpha1 there's a button on the bottom to make a new alpha channel, it'll be black so fill it with white or just paste whatever you need onto it after copying from the RGB. It's been forever since I did that but IIRC the highlight's alpha has to be an exact copy of the RGB but then you invert the alpha with Imagetool before you save it as 8-bit. I only pulled my hair out for about a week before I got it to work, lol. No offense taken BTW.

Jim
 
#9
Hello Jim

If there isn't an Alpha1 there's a button on the bottom to make a new alpha channel
LOL, as I always manipulate alphas within photoshop as a 24 bit before any conversion; I guess is the first time I manipulate it as it really is: a channel!

Well, this is what I have right now. It's not as crisp and incredibly reflective as yours; but not that bad, uhh? :D :D :D

Result_with_alpha_01.jpg


Thanks a million brother.
Take care.
Sergio.
 
#10
That highlight/reflection BTW was just a screenshot of some virtual cockpit taken looking backwards from the panel. I think I grayscaled it and then copied it to the alpha channel, inverted the alpha, etc. Yours looks great :)

Jim
 
Top