BMP2DCL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody and more specific LEE MAC,
I recently attacked the problem of displaying BMP files in DCL :image tiles.
I invented the wheel for a while until I stumbled upon the productions of LEE MAC.:
I found, that my approach was nearly entirely similar to his, with the exception, that instead of VECTOR_IMAGE-ing the image pixel by pixel I constructed my text files in the format like
"(4 18 20 227 200 152)
(4 20 22 219 192 145)
(5 0 12 255 255 255)
(5 12 14 241 237 232)" translated as linenumber, startcolumn, endcolumn, (colortriplet).
In this format it has the remnants of in-line compression in it; not so suitable for Photo's, but attractive for bitmaps of interface decorations. The problem I stumble upon is to work out the relation between the height and width of the BMP file versus the height and width of the DCL image elements. I can see head nor tail in it and I would greatly appreciate your comments on it..
Defintion of TEMP.DCL:
test:dialog{Label ="Test";
: row {
:image_button {key = "it";
vertical_margin = none;
horizontal_margin = none;
height = 4;
aspect_ratio = 1 ;
fixed_width = true;
fixed_height = true;
}
:image_button {key = "it1";
vertical_margin = none;
horizontal_margin = none;
height = 3;
aspect_ratio = 1 ;
fixed_width = true;
fixed_height = true;
}
}
ok_cancel;
:row {
spacer;
:image { key = "logo";
vertical_margin = none;
horizontal_margin = none;
width = 55;
aspect_ratio = 0.15;
fixed_width = true;
fixed_height = true;
}
spacer;
}
}