• MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    Quote:


    Is this the/a proper/recommended way?



    It is the proper way.

    Quote:


    I read about png2c from Zapek. Is this the proper way to do it?



    It depends. The png2c generates an ARGB array you can WritePixelArray() to a bitmap. You cant use it in MUIA_Background because that one supports only external files, boopsi image classes or predefined image type. If you embed your gfx to program code using png2 you must draw it yourself to the window.

    In short png2c is useful in custom classes only.

    Quote:


    Is there a similar program for "jpg2c"?



    I would use PNG because generated C code is just uncompressed ARGB data. You dont get any advantages of jpg but only disadvantages.

    Quote:


    Yes, I want to achieve a similar effect, that's it: Having one picture being the whole window backdrop. So for this I need to learn hooks?



    Not necessarily. I cant remember how UltraGelb achieved it. I would just try with MUI custom class first. If you go for backfill hooks it is not guaranteed to work (they are intrusive to MUI) and any mistake there may result in complete lockup of your machine.

    So better just go for MUI custom class. Probably you have to subclass your VGroup and overload MUIM_Backfill. This would allow better control to you background graphics and it is almost like window backfill hooks but easier to debug and control.
    1 + 1 = 3 with very large values of 1
  • »16.04.13 - 19:51
    Profile