Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ImageSize in XML gauges

Featured Replies

Hi all,I am a novice programmer of the new XML gauges, and for starting, a very simple question: In the sentence "ImageSize X,Y,Z,K", the Z and K parameters are the witdh and height of the bmp image, but what are the X and Y parameters?thanks

>Hi all, >>I am a novice programmer of the new XML gauges, and for >starting, a very simple question: In the sentence "ImageSize >X,Y,Z,K", the Z and K parameters are the witdh and height of >the bmp image, but what are the X and Y parameters? That would be ImageSizes="x,y,z,w"The first set refer to the 'default' size image stored in the 640 sub-directory of the gauge. The second set (z,w) are the dimensions of the 2nd (higher resolution) image stored in the 1024 sub-directory of the gauge.Note, it isn't strictly necessary to have both sizes, but you must at least have the 'default' size.Two points to keep in mind when designing artwork for gauges:1) The ratio between 640x480 and 1024x768 is 1:1.62) If you want to use both sizes, then to be sure that you are developing the gauge properly, use ONLY the 640x480 set when determining x,y cordinates (i.e., don't even HAVE a 1024 sub-directory in the gauge folder during development!). This will make sure that you're actually working with the 'small' set!When you are finished, designing and testing the gauge, edit the .XML code to add the ImageSizes for the 1024x768 set, and - of course - be sure to create a 1024 subdirctory and put the larger set of .bmp files in it! :)HINTS ON CREATING ARTWORK:I'm not going to retype the same information that's in the SDK, but I will tell you now that when designing your artwork, it's better to start with the largest images your paint program can handle, and then scale them downwards. IOW, create a very large set of image(s) [do NOT place 'type' at this time!], place *everything* in separate layers, then re-size them to your final dimensions.After creating the appropriate sizes, save the separate 'parts' (such as a needles, knobs, etc.) from each layer into a separate .bmp file. Since they were all 're-sized' together, you are guaranteed that they will play together well... :)Now, you can add the type (numbers, labels, etc.) to each set of graphic images. This is necessary because the 640 set will use aliased type, and the 1024 set will use anti-aliased type.I know this is more than you asked for, but hopefully it will help! :)Have fun!

Hi BillThank you very much for your answer, a very complete lesson.

  • 5 years later...

Is it possible to have folders for resolutions other than 600 and 1024? For example, can I include folders called "1280" and "1600"?

>Is it possible to have folders for resolutions other than 600>and 1024? For example, can I include folders called "1280" and>"1600"?No. Well, you can have any folder you want, but it will not be used by the gauge.

Heh! Thanks Patrick.

  • Moderator

FWIW, that schema isn't used in FSX any longer. In fact, it's seldom use by anyone for FS9 gauges either... ;)I mean, who builds a "low resolution panel" anymore?Does anyone still USE 640x480 screen resolution? :)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

I'm a liitle puzzled now.I've checked my own XML gauges and none of the actual gauges use ImageSizes. For development puposes I keep the gauges for my Hawker Fury with the aircraft in C:Program FilesMicrosoft GamesFlight Simulator 9AircraftHawker_Fury_1panelFury I don't need either a 640 or 1024 sub folder. I reference the gauges in panel config by, for example:gauge01=Fury!Turn_Slip, 446, 360 The only reference I have to any size is for the background in panel.cfg:{Window00}file_1024=Fury07.bmpsize_mm=1024,768

Gerry Howard

  • Moderator

That scheme was introduced for FS2002's debut of the XML gauge system. At that time, many people were still using lower res monitors, so it made perfect sense to have a "dual-resolution gauge texture" system.Beginning with FS2004 (FS9), the dual-resolution scheme was depecrated, although it was -of course- still supported.Now, with FSX although support for the earlier XML Schema (syntax) is provided, it is highly likely that it will not be supported in the next FS release.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

-snip-> Now, with FSX although support for the earlier XML Schema> (syntax) is provided, it is highly likely that it will> not be supported in the next FS release. groan! So that would mean we would be stuck with the 'new in FSX' BLOATED, difficult at best for a human to parse, XML... :( Paul

Wide-5.jpg

Precisely... now the question is, what's the point of the ImageSizes parameter anyway? You can put any values in there, the image will always show up in its original size. As far as I can see there's no way of scaling images, which is a shame as we're stuck with 1024x768 res gauges.

  • Moderator

>Precisely... now the question is, what's the point of the>ImageSizes parameter anyway? You can put any values in there,>the image will always show up in its original size.The original purpose of the ImageSizes value was to allow the fs panel system to automatically re-calculate x,y coordinates for the "upscaled size bitmaps."All x,y coordinates specified in the actual gauge script was based on the "low resolution" bitmap set.Since this is no longer needed, the ImageSizes property is no longer required, and unless you DO have a dual set of bitmaps, it is simply ignored.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

OK great, thanks Bill!

It's like Bill said. Forget about that image size - just don't use it in your gauges. Make the bitmaps in a good size, maybe twice as large as they will appear in the 2D panel and simply scale down the whole gauge via the panel.cfg. This will give you the best results - at least this is my opinion about this.Only in case you run FS on a low end machine, it makes sense to scale down the bitmaps to that size, they appear in the 2D panel (or the VC in default view). In this case FS can "use" the bitmaps as they are and does not have to rescale them, which will give you some more fps...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.