Jump to content

Editing BluRay IG Menu items


Recommended Posts

I have dipped my toe into editing the menus (IG Menu aka Interactive Graphics Menu) used in some BluRay discs.

 

The menus are made up of multiple objects that share a common 8-bit color palette. I know how to extract the objects and the color palette, and I know how to re-insert them into the BluRay data structure.

 

What I need help with is finding a way to import the color palette into paint.net. It is in xml format.

 

I have attached one of the objects and the corresponding color palette file.

 

Any help is greatly appreciated!

IGobject_0006_pal_01.png

palette_001.zip

Link to comment
Share on other sites

PDN palette files are quite simple text files. The format is explained here: https://www.getpaint.net/doc/latest/WorkingWithPalettes.html#4

 

You'll need to convert your XML into 8-digit hexadecimal numbers in AARRGGBB format - one per line and limit the number of colors to 96 as @toe_head2001 mentioned.

 

One tool which might help is my CSV filetype plugin. TIP: resultant file can be really large - so run it over a small region of the image, rather than the whole thing.

Link to comment
Share on other sites

I wasn't too fussy (only 70 colors remained after I removed duplicates):

 

Palette.png

 

Spoiler
; paint.net Palette File
; Lines that start with a semicolon are comments
; Colors are written as 8-digit hexadecimal numbers: aarrggbb
; For example, this would specify green: FF00FF00
; The alpha ('aa') value specifies how transparent a color is. FF is fully opaque, 00 is fully transparent.
; A palette must consist of ninety six (96) colors. If there are less than this, the remaining color
; slots will be set to white (FFFFFFFF). If there are more, then the remaining colors will be ignored.
D5323230
D12F2F2F
CE2A2A2A
CE252525
CA1E1E1E
C6181818
C2151515
BE0F0F0F
BA0A0A0A
B8070707
B5030303
B3000000
FC73171F
F275343A
F1643137
E9674648
E1554342
DF3D403F
B6060606
B4010101
FE950D18
FE8A020E
FE920513
FE840C17
FE7A0B15
FE74000C
FE630003
FE300000
FE210001
C0131313
BB0C0C0C
B7070707
FEA5111F
FEB01120
FE920006
FE80000A
FE500003
FE270000
E15B4F4F
BD0E0E0E
FEA40B1A
FEB30D18
FEA50610
FEA00005
FE540109
FE3A0001
E94F5152
C81C1C1C
FFFAFAFA
FFFEFEFE
FE9B000D
CA1D1D1D
FEF6F6F6
FE740002
FE8C1120
CD222222
FEE9E9E9
FFFBFBFB
FE590001
D42A2A2A
FEF1F1F1
FFFDFDFD
FE690008
FE9C1A26
DD444648
FE6F0711
FE9B121E
FC1A191C
FA222124
D6363636

 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, Ego Eram Reputo said:

I wasn't too fussy (only 70 colors remained after I removed duplicates):

Impressive work. However, with the image, I seem to be getting 237 colors, and with modifying XML, there's 253 colors?

 

Seem like you coded the color filtering quite well as I think it's based on RGB rather than using all channels.

 

Filtering based on RGB using image gets me 228 colors.

Filtering based on XML using image gets me 238 colors.

 

How are you getting 70?

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

I took a really small sample of the image (only 70x10). I was only trying to capture some of the reds, the background and the white bars B)

  • Like 1
Link to comment
Share on other sites

54 minutes ago, Reptillian said:

However, with the image, I seem to be getting 237 colors, and with modifying XML, there's 253 colors?

 

The XML contains 238 unique colors, in both RGB and YCrCb formats. Based on UseForm attribute in the XML it appears that the device uses the YCrCb values when it displays the image.

I have no clue what the T value is in the XML, but several entries are the same except for that field.

The last palette entry is all zeros, so I am guessing that it is invalid/unused.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

4 minutes ago, Reptillian said:

T is likely to be transparency.

 

I think you are correct. With the transparency value included there are 252 unique RGB/YCrCb colors in the XML.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

I made my own palette based on the original image. Generated by generating a palette with all color, then generating a palette with reduced color, then I mapped the index of closest color and removed duplicates. This is how it is generated. I did some sorting too.

 

image.png

 

; paint.net Palette File: BluRay IG Menu Palette
; Color Format - AARRGGBB
; Colors: 93
FFB00009
FFC10006
FFD50311
FFE00313
FFDF0717
FFD90814
FFE20C1C
FFFBFBFB
FEA00005
FE1C0000
FE110006
FE000203
FE010200
FE3A0001
FE500003
FE74000C
FE270000
FE80000A
FE8A020E
FEBC0517
FED90D24
FED10D1B
FEA40B1A
FECA1325
FEB01120
FEBF1425
FE9B121E
FECE192B
FE8C1120
FEBD1E2D
FE0C0503
FEB74046
FEB5434E
FEB64C54
FE080B07
FED7D7D7
FEE9E9E9
FEE2E2E2
FEF4F4F4
FD60040A
FD0B0F12
FC73171F
FC932632
FC121619
FC1A191C
FCD0D0D0
FA9E343F
FA222124
F9292B2F
F9BEBEBE
F534363A
F489484E
F357191E
F3915E61
F275343A
F2A57A7B
F1643137
F17D4349
F13F3E41
EF010101
EE6A272B
EE6F6A6E
EE878586
EA754B50
E9674648
E94F5152
E7705557
E4625253
E1554342
E15B4F4F
DF3D403F
DD41220F
DD444648
DC292C2B
DB4B4243
DB4E4E4E
D8382B29
D83A3A3A
D7443D3D
D6363636
D42A2A2A
D12F2F2F
CE252525
CE2A2A2A
CA1E1E1E
C81C1C1C
C6181818
C61B1B1B
C2151515
BC0D0D0D
B6060606
B4010101
B3000000
; End of Palette List
00808080
00808080
00808080

 

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...