messages
listlengths 1
1
| topic
stringlengths 2
60
|
|---|---|
[
{
"date": "2016-10-05",
"forum": "FiveWin para Harbour/xHarbour",
"text": "estimado:\n\nhace años tuve esa misma inquietud, intente utilizar una librería para hacer gráficos 3d de terceros pero era muy tediosa, al final realice un programa por la cual trate de mostrar el stock disponible en cámaras de frio, con pasillos y posiciones y una \"vista aérea\" en 2d simulando mas menos como están las cámaras en capacidad.\n\nla verdad sé que no sirve a tus intenciones, pero tuve una muy buena aceptación por parte de los clientes a la cual les mostré el resultado.\n\n\"esto es solo ilustrativo y es solo una idea para que puedas pensar en realizar algo parecido o mejor\"\n\nSaludos.\n\nvista de las camaras: \n\n[img:3nv2dais]http://i64.tinypic.com/65v1p1.png[/img:3nv2dais]\n\nvista de pasillos:\n\n[img:3nv2dais]http://i64.tinypic.com/jaxiq1.png[/img:3nv2dais]\n\nvista de posiciones:\n\n[img:3nv2dais]http://i68.tinypic.com/2h352kj.png[/img:3nv2dais]\n\nvista aérea en 2d:\n\n[img:3nv2dais]http://i64.tinypic.com/2igk5ee.png[/img:3nv2dais]\n\n\nSaludos desde Chile.",
"time": "22:08",
"topic": "Almacén Virtual 3D.",
"username": "armando.lagunas"
}
] |
Almacén Virtual 3D.
|
[
{
"date": "2016-10-06",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola hablando con mi jefe, y pensando en la mejor solución, vamos a optar más por la solución de Armando.\n\nEstaría muy bien hacerlo en 3D con gafas,pero claro es que cambia constantemente.\n\nY para que el carretillero busque un producto no creo que llegue a ser realmente necesario, aunque conociendo al cliente, seguro que ahora no pero cuando el proyecto principal este finalizado seguro que replantea el tema.\n\nAsí que si alguien tiene hecho algo como Armando agradecería como ha hecho él, enviar algún pantalla o samples para ver que opción nos puede venir mejor. \n\n\nMuchas Gracias Armando por tu ayuda. Me ha parecido una gran idea.",
"time": "11:04",
"topic": "Almacén Virtual 3D.",
"username": "Garbi"
}
] |
Almacén Virtual 3D.
|
[
{
"date": "2019-07-31",
"forum": "FiveTouch",
"text": "Estimados buenas noches\nde tanta muda de un equipo a otro se me ha perdido todo lo que acompana a fivetouch\nes decir\nHarbour\nMingw\nhbqt\n\nes decir a pesar de que inclusive logre compilar con una versión de QT 5,13 ya no me ejecuta nada\nsi alguien tiene funcionando fivetouch con sus respectivos harbour mingw y hbqt \nme seria de mucha utilidad si podría acceder a los mismos\nGracias de antemano y perdon si no me explique bien\nsaludos\nWilson",
"time": "01:39",
"topic": "Almas caritativas Fivetouch",
"username": "wilsongamboa"
}
] |
Almas caritativas Fivetouch
|
[
{
"date": "2012-07-24",
"forum": "Off Topic / Otros temas",
"text": "[quote=\"Antonio Linares\":jpcuggc6]Carlos,\n\nTal vez pueda servirle esto:\n\n[url:jpcuggc6]http://www.couchsurfing.org/[/url:jpcuggc6][/quote:jpcuggc6]\n\nGracias Antonio, lo miro.",
"time": "16:13",
"topic": "Alojamiento en Goteborg",
"username": "FiveWiDi"
}
] |
Alojamiento en Goteborg
|
[
{
"date": "2012-07-24",
"forum": "Off Topic / Otros temas",
"text": "Hola a todos,\n\nPerdonad el Off Topic.\n\nMI sobrina se va de Erasmus a Goteborg en 4 semanas y está teniendo problemas para encontrar alojamiento (la burocracia española se la ha \"jugado\").\n\n¿Alguién tiene algun contacto en Goteborg que le puede echar un cable?\n\nMuchas gracias.",
"time": "11:35",
"topic": "Alojamiento en Goteborg",
"username": "FiveWiDi"
}
] |
Alojamiento en Goteborg
|
[
{
"date": "2012-07-24",
"forum": "Off Topic / Otros temas",
"text": "Carlos,\n\nTal vez pueda servirle esto:\n\n[url:askvorzk]http://www.couchsurfing.org/[/url:askvorzk]",
"time": "13:37",
"topic": "Alojamiento en Goteborg",
"username": "Antonio Linares"
}
] |
Alojamiento en Goteborg
|
[
{
"date": "2009-01-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello,\n\nA option in my xBrowse-Tests is to show a Alphablended-BMP inside\nxBrowse on top of a Brush or Image.\nI tested inside the Dialog and ONPAINT.\n\nIs it possible ?, otherwise I have to delete this option in my tests. \nIn my tests, I got it allways shown on the Dialog-Background.\n\n[img:bdd1r50g]http://www.pflegeplus.com/pictures/xbrwalpha.jpg[/img:bdd1r50g]\n\n[code:bdd1r50g]\n\n..\noBrw5:CreateFromResource( 110 )\n\n// Image-Brush\n// ----------------\nIF nArrayPos = 3 .or. nArrayPos = 8\n DEFINE BRUSH oBrush5 FILENAME \"MARBLE.bmp\"\n oBrw5:SetBackGround( oBrush5 )\n RELEASE BRUSH oBrush5\n oBrw5:Refresh()\nENDIF\n\n// Alpha-BMP\n// --------------\nIF nArrayPos = 8\n hDC := oBrw5:GETDC()\n* W_ALPHA( hDC, oBrw5 )\n* oBrw5:RELEASEDC()\nENDIF\n\nREDEFINE BUTTONBMP oButton ID 30 OF oDlg5 ;\nACTION oDlg5:End() ;\nBITMAP \"Quit\" PROMPT \" Exit\" TEXTRIGHT\n\nACTIVATE DIALOG oDlg5 CENTERED ; \nON PAINT ( W_GRAD( hDC, oDlg5 ), ;\n IIF(nArrayPos = 8, ( W_ALPHA( hDC, oBrw5 ), oBrw5:RELEASEDC() ), NIL ) )\n\noProgFont1:End()\n\nRETURN( NIL )\n\n// --------------------------\n\nSTATIC FUNCTION W_ALPHA( hDC, oWnd )\nLOCAL oBmp1 \n\nDEFINE BITMAP oBmp1 FILENAME \"A_LOGO.BMP\"\nABPaint( hDC, 20, 20, oBmp1:hBitmap, 220 )\n\nRETURN NIL\n\n[/code:bdd1r50g]\n\nI tested this and the Alpha-BMP is painted inside the xBrowse, \nbut doesn't stay on screen ( just shown a second ) :\n\n[code:bdd1r50g]\n\n....\n....\n\nDEFINE BITMAP oBmp1 FILENAME \"A_LOGO.BMP\"\n\nACTIVATE DIALOG oDlg5 CENTERED ; \nON PAINT ( hDC := oBrw5:GETDC(), ;\n oBrw5:SetBackGround( ABPaint( hDC, 20, 20, oBmp1:hBitmap, 220 ) ), ;\n oBrw5:RELEASEDC() )\n\n[/code:bdd1r50g]\n\nRegards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "12:52",
"topic": "Alpablended-BMP on top of xBrowse-Brush or Image ?",
"username": "ukoenig"
}
] |
Alpablended-BMP on top of xBrowse-Brush or Image ?
|
[
{
"date": "2009-03-25",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Holas a todos..\n\nUna suposicion...\n\n¿ Si solo quisiera usar ALPHABITMAPS en TODA mi aplicacion ( de hecho los BMP e Iconos que tengo pensado usar en un nuevo desarrollo solo son \"Bitmaps with Alpha Channel\" ), que cambios serian necesarios en las clases TBitmap, Timage, Tbutton etc etc ?\n\n¿ O Solo reemplazar la llamada a DrawMasked por ABPAINT en algun .c ?\n\nLos cambios de Giovany Vecchi a la tButtonBmp son geniales, la presentacion visual de la aplicacion es mucho mas PRO y moderna, los clientes estan mas acostumbrados a las transparencias, sombras, con VISTA y ahora con WINDOWS 7, pero no puedo replicarlos en la Toolbar, TRebar, TImage ....\n\nAlguna idea.",
"time": "13:54",
"topic": "Alpha BMPs en toda la aplicacion...?",
"username": "Adolfo"
}
] |
Alpha BMPs en toda la aplicacion...?
|
[
{
"date": "2009-03-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola Mr.Adolfo,\n\nTambién soy de la misma opinión. Estoy desarrollando una nueva aplicación y creo firmemente que la aplicación debe tener la contemporánea Vista, Windows 7 y no como en los viejos Windows'98 o Windows 2000. La estética del programa es muy importante. Con la ayuda de nuestro foro y he modificado TButtonBmp TBitmap para apoyar canal alfa, pero no han hecho nada sobre la TBtnBmp.\nCon los cambios que tienen la opción de especificar si la BMP AlphaChannel está teniendo o no y, en consecuencia, la pintura sea el método utilizado. También he pedido a Mr.Antonio para incluir estos cambios. Antonio dice que está buscando una solución para que las clases se determinará si el BMP contiene AlphaChannel o no y, en consecuencia, llamar al método de la pintura. Pero sugiero que hasta nos encontramos con la detección automática que deberíamos tener la opción de decir que la programación contiene AlphaChannel o BMP y no cumplir el requisito.\n\nSaludos",
"time": "09:26",
"topic": "Alpha BMPs en toda la aplicacion...?",
"username": "anserkk"
}
] |
Alpha BMPs en toda la aplicacion...?
|
[
{
"date": "2009-03-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Adolfo, Answer,\n\nSee this thread in stackoverflow and lets check what is the final solution:\nVeamos que solución se aporta en esta conversación:\n\n[url:1lealmh0]http://stackoverflow.com/questions/685684/how-to-programmatically-detect-if-a-bitmap-has-alpha-channel[/url:1lealmh0]",
"time": "14:27",
"topic": "Alpha BMPs en toda la aplicacion...?",
"username": "Antonio Linares"
}
] |
Alpha BMPs en toda la aplicacion...?
|
[
{
"date": "2010-07-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Most objects that support bitmap already supports bitmaps with alpha channel as an example I can cite the RibbonBar I'm currently using, but if I use these bitmaps on the menu, a black border appears.\n\nThe menu does not support this type of bitmap?",
"time": "13:03",
"topic": "Alpha Bitmap + Menu",
"username": "sambomb"
}
] |
Alpha Bitmap + Menu
|
[
{
"date": "2009-07-14",
"forum": "FiveWin for Harbour/xHarbour",
"text": "There is a problem with painting of some alpha bitmaps on buttonbars from version 9.04 onwards.\n\n[url=http://img119.imageshack.us/i/alphabar.jpg/:2aw6fr51][img:2aw6fr51]http://img119.imageshack.us/img119/7072/alphabar.jpg[/img:2aw6fr51][/url:2aw6fr51]\n\n[code=fw:2aw6fr51]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">'fivewin.ch'</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oWnd, oBar<br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">'Alpha Bitmaps on Button Bar'</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTONBAR</span> oBar <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">64</span>,<span style=\"color: #000000;\">64</span> <span style=\"color: #000000;\">2007</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\u</span>p.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\d</span>own.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\p</span>lus.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\m</span>inus.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\p</span>hone.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\i</span>nfo.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\u</span>ser.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\w</span>orld.bmp'</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #0000ff;\">OF</span> oBar FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\3</span>2x32<span style=\"color: #000000;\">\\i</span>nfo.bmp'</span><br /><br /> <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /> </div>[/code:2aw6fr51]\n\nThese buttonbars were working properly in earlier versions. Upgrading the application with latest FWH versions is producing unacceptable look.\n\nHere is the screenshot of the same program in version 9.03\n\n[url=http://img406.imageshack.us/i/alphabar.jpg/:2aw6fr51][img:2aw6fr51]http://img406.imageshack.us/img406/7072/alphabar.jpg[/img:2aw6fr51][/url:2aw6fr51]\n\nSimilar is the case with some bitmaps in XBrowse also. The problem basically observed with 'many' ( not all ) alpha bitmaps in 32x32 folder\n\nCan this be fixed ?",
"time": "23:33",
"topic": "Alpha Bitmaps on Button Bar",
"username": "nageswaragunupudi"
}
] |
Alpha Bitmaps on Button Bar
|
[
{
"date": "2009-07-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Buttons and Buttonbar are working with real Hight-Resolution-Alpha-Channel-BMP's now.\nThe Bitmaps ( Down, Minus, Plus, Up ) have Alpha-Channels, but doesn't work.\nI exported them as < Premultiplied Alpha > and it worked.\nFor the Test, I converted the transparent Background of BMP < Down >.\nIt is easy and 100 % working, to change them with Pixelformer => Import / Export \n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=15008&p=77576&hilit=pixelformer#p77576\">viewtopic.php?f=3&t=15008&p=77576&hilit=pixelformer#p77576</a><!-- l -->\n\n[img:x0v07krt]http://www.pflegeplus.com/pictures/Alphablend1.jpg[/img:x0v07krt]\n\nA picture-viewer shows the original BMP < Down > transparent ( white Background )\n[img:x0v07krt]http://www.pflegeplus.com/pictures/AlphaCon4.jpg[/img:x0v07krt]\nThe Result after Export, shows a transparent [color=#BF0000:x0v07krt]Black[/color:x0v07krt] Background\n[img:x0v07krt]http://www.pflegeplus.com/pictures/AlphaCon3.jpg[/img:x0v07krt]\n\nChoose < Import > to convert BMP < UP >( with checked background ) :\n[img:x0v07krt]http://www.pflegeplus.com/pictures/AlphaCon1.jpg[/img:x0v07krt]\n\nFor Export, activate BMP-Format : < Premultipled Alpha >\n[img:x0v07krt]http://www.pflegeplus.com/pictures/AlphaCon2.jpg[/img:x0v07krt]\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "01:02",
"topic": "Alpha Bitmaps on Button Bar",
"username": "ukoenig"
}
] |
Alpha Bitmaps on Button Bar
|
[
{
"date": "2009-07-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote:f5thc5l8]The Bitmaps ( Down, Minus, Plus, Up ) have Alpha-Channels, but doesn't work.\nI exported them as < Premultiplied Alpha > and it worked.\n[/quote:f5thc5l8]\n\nThat is the point. Most of the alpha bitmaps in the 32x32 folder are straight, not premultiplied alpha bitmaps and ABPaint works only with bitmaps with premultiplied alpha information.\n\nWish FWH provides these bitmaps converted as premultiplied, so that laymen like me can use them straight. Or still better ABpaint recognizes if the alpha is premultiplied or not and use appropriate painting algorithm. I am a novice in this area, but as a layman on the subject, I would like if this is provided by FW",
"time": "04:53",
"topic": "Alpha Bitmaps on Button Bar",
"username": "nageswaragunupudi"
}
] |
Alpha Bitmaps on Button Bar
|
[
{
"date": "2009-07-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Mr Uwe\n\nThanks\n\nI downloaded pixelformer and converted all these bmps. Now all work excellently with the new ABPaint() of FWH",
"time": "07:58",
"topic": "Alpha Bitmaps on Button Bar",
"username": "nageswaragunupudi"
}
] |
Alpha Bitmaps on Button Bar
|
[
{
"date": "2009-07-15",
"forum": "FiveWin for Harbour/xHarbour",
"text": "To make it complete, the LOGO-Solution and Button-Convert : \n\nPainting a Alpha-Blended-BMP-Logo from any Image ( for Buttons, it is the same ).\n( You don't need to know anything about Layers. \nThat makes it easy for more inexperienced Graphic-application users )\n\nA normal JPG-Photo ( Angelina.jpg ) is used.\n\n1. We have to define on < Image-Properties > from the Top, that we want to work on a transparent Image.\nWe select < RGB-Colors with Alpha-Channel >.\nWe use the Brush ( transparent ) and paint the Background of the Photo.\nThere is a Tool < Magic Wall >. It detects the borders of a Color to be filled with a transparent Brush.\nInside a Photo, there is no single Background-Color. \nThis Tool is useful, to fill a Button-Background ( transparent ), if just 1 Color is detected.\nThis way, the old Buttons with a defined Background-Color, can easely converted to Alpha-Blended BMP's. \nThe Transparent-Level can be adjusted with a Dbl-Click on the Transparent-Symbol.\n[img:gmsbls24]http://www.pflegeplus.com/pictures/trans1.jpg[/img:gmsbls24]\n\n2. We Export the Image as BMP with the < Premultiplied Alpha > Selection\n[img:gmsbls24]http://www.pflegeplus.com/pictures/trans2.jpg[/img:gmsbls24]\n\n3. The Result.\n[img:gmsbls24]http://www.pflegeplus.com/pictures/trans3.jpg[/img:gmsbls24]\n\nChanging a FWH-Button to Alpha-Blended BMP\n1. We change the Propertie to Transparent\n2. We set the transparent-level to 100 % \n[img:gmsbls24]http://www.pflegeplus.com/pictures/trans4.jpg[/img:gmsbls24]\n\nWe use the < Magic wall > to select the purple area, we want to change to transparent.\nWe fill the area, using the bucket-tool.\n[img:gmsbls24]http://www.pflegeplus.com/pictures/trans5.jpg[/img:gmsbls24]\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "16:09",
"topic": "Alpha Bitmaps on Button Bar",
"username": "ukoenig"
}
] |
Alpha Bitmaps on Button Bar
|
[
{
"date": "2009-07-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Uwe,\n\nMany thanks for your tutorials. Really great <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "19:40",
"topic": "Alpha Bitmaps on Button Bar",
"username": "Antonio Linares"
}
] |
Alpha Bitmaps on Button Bar
|
[
{
"date": "2009-03-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Olá Antonio,\n\nEstou tentando usar um bmp-alpha em minha tela principal só que está aparecendo o fundo do bmp. Veja:\n\n[img:2njq6h27]http://br.geocities.com/qiinformatica2000/alpha.PNG[/img:2njq6h27]\n\nAqui está os links para baixar os bmp´s:\n\n[url:2njq6h27]http://br.geocities.com/qiinformatica2000/brick.bmp[/url:2njq6h27]\n\n[url:2njq6h27]http://br.geocities.com/qiinformatica2000/lixeira.bmp[/url:2njq6h27]\n\nE aqui o fonte para teste:\n\n[code=fw:2njq6h27]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /> <br />*************<br /><span style=\"color: #00C800;\">function</span> MAIN<br />*************<br /><br /><span style=\"color: #00C800;\">local</span> oBrush, oWnd, oBmp<br /><br /><span style=\"color: #0000ff;\">define</span> <span style=\"color: #0000ff;\">brush</span> oBrush filename <span style=\"color: #ff0000;\">\"brick.bmp\"</span><br /><br /><span style=\"color: #0000ff;\">define</span> <span style=\"color: #0000ff;\">window</span> oWnd <span style=\"color: #0000ff;\">title</span> <span style=\"color: #ff0000;\">\"Teste de Alpha Chanels\"</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br /><br />SET <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">to</span> <span style=\"color: #ff0000;\">\"\"</span> NOINSET DATE CLOCK KEYBOARD <span style=\"color: #000000;\">2007</span> <br /><br /><span style=\"color: #0000ff;\">define</span> bitmap oBmp <span style=\"color: #0000ff;\">of</span> oWnd filename <span style=\"color: #ff0000;\">\"lixeira.bmp\"</span><br /><br />oWnd:<span style=\"color: #000000;\">bPainted</span> := <span style=\"color: #000000;\">{</span> | hDC | ABPaint<span style=\"color: #000000;\">(</span> hDC, <span style=\"color: #000000;\">(</span> oWnd:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span> - <span style=\"color: #000000;\">(</span> oBmp:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> oWnd:<span style=\"color: #000000;\">nHeight</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span> - <span style=\"color: #000000;\">(</span> oBmp:<span style=\"color: #000000;\">nHeight</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">50</span>, oBmp:<span style=\"color: #000000;\">hBitmap</span>, <span style=\"color: #000000;\">220</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #0000ff;\">activate</span> <span style=\"color: #0000ff;\">window</span> oWnd <span style=\"color: #0000ff;\">MAXIMIZED</span><br /><br />oBmp:<span style=\"color: #000000;\">end</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">NIL</span><br /> </div>[/code:2njq6h27]",
"time": "15:15",
"topic": "Alpha Bmp não mostra corretamente",
"username": "Rossine"
}
] |
Alpha Bmp não mostra corretamente
|
[
{
"date": "2009-03-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Rossine,\n\nNormalmente eso debe a que el bitmap no esta bien creado con el canal alpha.\n\nPrueba a usar:\nFWH\\bitmaps\\AlphaBmp\\trash.bmp",
"time": "20:04",
"topic": "Alpha Bmp não mostra corretamente",
"username": "Antonio Linares"
}
] |
Alpha Bmp não mostra corretamente
|
[
{
"date": "2009-03-26",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Rossine,\n\nPrueba este ejemplo, veras que el bitmap con canal alpha se muestra bien:\nFWH\\samples\\TestAB.prg",
"time": "20:08",
"topic": "Alpha Bmp não mostra corretamente",
"username": "Antonio Linares"
}
] |
Alpha Bmp não mostra corretamente
|
[
{
"date": "2009-03-27",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Sim Antonio, o problema estava com a imagem <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->",
"time": "15:42",
"topic": "Alpha Bmp não mostra corretamente",
"username": "Rossine"
}
] |
Alpha Bmp não mostra corretamente
|
[
{
"date": "2017-12-07",
"forum": "latest AI news",
"text": "Alpha Zero: Learning from scratch. Only with the rules of the game. Then began to play using a Monte-Carlo algorithm, which uses random moves at first until a neural network begins to learn which are the most promising options.\nIt took only four hours to play against himself to synthesize the chess knowledge of a millennium, and reach a level where he not only surpassed humans but also the world champion of Computer analysis modules, Stockfish. <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: --> \n\n[url:2ghvibs9]https://deepmind.com/blog/alphago-zero-learning-scratch/[/url:2ghvibs9]\n[url:2ghvibs9]https://chess24.com/es/informate/noticias/el-nuevo-amo-del-ajedrez-alphazero[/url:2ghvibs9] Spanish",
"time": "17:25",
"topic": "Alpha Zero, the new Chess Master",
"username": "Biel EA6DD"
}
] |
Alpha Zero, the new Chess Master
|
[
{
"date": "2017-12-08",
"forum": "latest AI news",
"text": "Realmente impresionante, muchas gracias Biel <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\n[quote:1jt3fjqj]El algoritmo AlphaZero desarrollado por Google y DeepMind necesitó solo de cuatro horas de [b:1jt3fjqj]jugar contra sí mismo[/b:1jt3fjqj] para sintetizar el conocimiento ajedrecístico de un milenio y medio y alcanzar un nivel en el que no solo superó a los humanos sino también al campeón mundial de módulos de análisis[/quote:1jt3fjqj]\n\n[quote:1jt3fjqj]Si llegamos a crear algún tipo de consciencia e inteligencia muy básicas —el significado real de la Inteligencia Artificial—, es posible que este enfoque de aprendizaje se transforme en la entidad más inteligente del universo conocido[/quote:1jt3fjqj]",
"time": "08:20",
"topic": "Alpha Zero, the new Chess Master",
"username": "Antonio Linares"
}
] |
Alpha Zero, the new Chess Master
|
[
{
"date": "2017-12-08",
"forum": "latest AI news",
"text": "[url:dw8j9b3q]https://twitter.com/search?q=AlphaZero&src=typd[/url:dw8j9b3q]\n\n[url:dw8j9b3q]https://youtu.be/yth1hXDfJ-g[/url:dw8j9b3q]",
"time": "09:36",
"topic": "Alpha Zero, the new Chess Master",
"username": "Antonio Linares"
}
] |
Alpha Zero, the new Chess Master
|
[
{
"date": "2017-12-08",
"forum": "latest AI news",
"text": "[b:7v51ldf6]Self-Play with a General Reinforcement Learning Algorithm[/b:7v51ldf6]\n\n[url:7v51ldf6]https://arxiv.org/pdf/1712.01815.pdf[/url:7v51ldf6]",
"time": "13:36",
"topic": "Alpha Zero, the new Chess Master",
"username": "Antonio Linares"
}
] |
Alpha Zero, the new Chess Master
|
[
{
"date": "2017-12-08",
"forum": "latest AI news",
"text": "A deep change is coming... <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\n[url:1psdg0n4]https://youtu.be/tXlM99xPQC8[/url:1psdg0n4]",
"time": "13:37",
"topic": "Alpha Zero, the new Chess Master",
"username": "Antonio Linares"
}
] |
Alpha Zero, the new Chess Master
|
[
{
"date": "2017-12-08",
"forum": "latest AI news",
"text": "I N C R E I B L E (con mayúscula)",
"time": "23:00",
"topic": "Alpha Zero, the new Chess Master",
"username": "George"
}
] |
Alpha Zero, the new Chess Master
|
[
{
"date": "2009-03-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello,\n\nafter testing many graphic-applications :\nPhotoshop, Gimp, Icofx, xNview and more, I found a new two step-solution,\nalso to understand and useful for non experienced graphic-users.\nThe tool is designed, to make it easy, to convert to a Image with a Alpha-Blended background.\n\nA situation could be : \nPainting some transparent areas in a existing normal BMP and convert to Alpha-Blended. \nHow to do this, I will describe / add the solution in this toppic.\n\nDownload [color=#FF0000:2x4pe8a2]Pixelformer[/color:2x4pe8a2] :\n<!-- m --><a class=\"postlink\" href=\"http://www.qualibyte.com/\">http://www.qualibyte.com/</a><!-- m -->\n\nThe working-File : PNG-format with transparent-Background ( import )\n[img:2x4pe8a2]http://www.pflegeplus.com/pictures/pixel1.jpg[/img:2x4pe8a2]\n\nThe Export Alpha-Blended-BMP-File\n[img:2x4pe8a2]http://www.pflegeplus.com/pictures/pixel3.jpg[/img:2x4pe8a2]\n\nAfter the given Export-BMP-Filename,\nthe Setting for Alpha-Blended-BMP ( automaticly detects the needed values for best results )\n[img:2x4pe8a2]http://www.pflegeplus.com/pictures/pixel4.jpg[/img:2x4pe8a2]\n\nThe result : Alpha-Blended-BMP\nSyntax for Alpha-Blended-BMP's to be used :\n[color=#FF0000:2x4pe8a2].....\n.....\nDEFINE BITMAP oBmp FILENAME \"LOGO.bmp\"\n\nACTIVATE WINDOW oWnd MAXIMIZED ;\nON PAINT ( ABPaint( hDC, 20, 20, oBmp:hBitmap, 220 ) ) \n.....\n.....[/color:2x4pe8a2]\n\n[img:2x4pe8a2]http://www.pflegeplus.com/pictures/pixel2.jpg[/img:2x4pe8a2]\n\nRegards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "14:41",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "ukoenig"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Uwe, this is free ?",
"time": "16:14",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Silvio"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-24",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Silvio,\n\nThis application is [color=#FF0000:izel98ci]FREE [/color:izel98ci]of charge.\nIt works perfect and does exactly the things I need. All other applications are difficultly, to handle this.\nThe application is specially designed as solution for Alpha-Blending.\nYou can define transparentcy for BMP, JPG, PNG, TGA, ICO, CUR straight inside the loaded image.\nI'm not sure, for how long it will be free of charge. It is the new Beta-release.\n\nA sample from FWH\\bitmaps\\beach.bmp ( normal BMP ) converted to Alpha-Blended,\nmaking a paper-effect. It is possible now, to make any normal BMP / JPG transparent.\nBefore, I converted to PNG at first, but now it works with a straight define of the Alpha-Channel\nSelect => Project => Image properties.\nIf You load a PNG-file, there is nothing to do, because the Alpha-Channel is defined already.\n\nDownload : Screenshot-selection < How to do it >\n<!-- m --><a class=\"postlink\" href=\"http://www.pflegeplus.com/fw_downloads/alpha.zip\">http://www.pflegeplus.com/fw_downloads/alpha.zip</a><!-- m -->\n\n1. Import the Image\n2. Set Image properties\n3. Select TRANSPARENT-color for the brush-tool from the color-picker.\n4. Paint the borders / areas transparent with the brush-tool\n or select the magic tool to choose a color to make transparent.\n5. Save ( export ) as BMP like shown on top.\n\nAfter loading the BMP-file, you have to change the format before painting, to get the Alpha-Channel\nProject => Image properties\n\n[img:izel98ci]http://www.pflegeplus.com/pictures/pixel8.jpg[/img:izel98ci]\n\nThe Result after export to BMP ( see : how to save on top )\n\n[img:izel98ci]http://www.pflegeplus.com/pictures/pixel6.jpg[/img:izel98ci]\n\nSaved as Alpha-Blended-BMP transparent\n\nSome tools make it easy, to change a color to transparent\nThe magic-tool detects the area of a selected color\n\n[img:izel98ci]http://www.pflegeplus.com/pictures/pixel9.jpg[/img:izel98ci]\n\nRegards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "16:40",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "ukoenig"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello,\n\nafter creating some hight-quality Alpha-Blended-BMP's\nwith very good results :\n\n[color=#FF0000:11orpi3z]DEFINE BITMAP oBmp FILENAME \"LOGO.bmp\"\n...\nACTIVATE WINDOW oWnd MAXIMIZED ;\nON PAINT ( ABPaint( hDC, 20, 20, oBmp:hBitmap, 220 ) ) [/color:11orpi3z]\n\nI tested with :\n\n[color=#FF0000:11orpi3z]@ 10, 10 BITMAP oBmp1 FILENAME \"LOGO.bmp\" NOBORDER\noBmp:lTransparent := .T.\noBmp:Refresh()[/color:11orpi3z]\n\nit doesn't display the BMP.\nI changed the transparent area to black and there was no display.\n\nIs there a difference of the used BMP-quality ( BMP 24 Bits for Alpha-Blending ) ?\n\nRegards\nUwe <!-- s:roll: --><img src=\"{SMILIES_PATH}/icon_rolleyes.gif\" alt=\":roll:\" title=\"Rolling Eyes\" /><!-- s:roll: -->",
"time": "12:05",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "ukoenig"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear Mr.Uwe,\n\nYou need to modify the class TBitmap to call AbPaint in the Paint method. The same applies to TButtonBmp.\nIf you search for AlphaBmp you will find the details about the required modifications in those classes. A Data named lAlphaBmp is set to .T. to display AlphaBmp's. In the Method Paint based on the value of lAlphaBmp the required paint method is called ie either AbPaint or the default Paint\n\nRegards\n\nAnser",
"time": "13:01",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "anserkk"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "do you try with \n\n [b:3jzipqls]LOCAL oBrush := TBrush():New(\"NULL\",,,)[/b:3jzipqls]\n\n @ 320, 15 BITMAP oApp:oLogoBmp FILENAME \".\\bitmaps\\LOGOSYST2.BMP\" NOBORDER PIXEL OF oApp():oDlg\n oApp:oLogoBmp:nClrPane := GetSysColor(3)\n oApp:oLogoBmp:lTransparent := .t.\n oApp:oLogoBmp:oBrush := [b:3jzipqls]oBrush[/b:3jzipqls] \n oApp:oLogoBmp:oCursor:= oCursor\n oApp:oLogoBmp:bLClicked := {|| GoWeb(\"www.rivamania.it\")}",
"time": "13:23",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Silvio"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": ">A Data named lAlphaBmp is set to .T. to display AlphaBmp's.\n\nIt would nice if the program could automatically detect if the BMP was alpha and then use the correct paint method. Does anyone know how?\n\nRegards,\nJames",
"time": "14:31",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "James Bott"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "James,\n\nLets check this thread in stackoverflow and lets see what is the final solution:\n\n[url:2fdcpz4z]http://stackoverflow.com/questions/685684/how-to-programmatically-detect-if-a-bitmap-has-alpha-channel[/url:2fdcpz4z]",
"time": "14:39",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Antonio,\n\nI don't understand it, but maybe this code will help:\n\n<!-- m --><a class=\"postlink\" href=\"http://stackoverflow.com/questions/333559/c-win32-how-to-get-the-alpha-channel-from-an-hbitmap\">http://stackoverflow.com/questions/3335 ... an-hbitmap</a><!-- m -->\n\nJames",
"time": "22:42",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "James Bott"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Here is a C++ class (free) that does all kinds of bitmap manipulation. Maybe it is useful.\n\n<!-- m --><a class=\"postlink\" href=\"http://www.codeproject.com/KB/graphics/CBitmapEx.aspx\">http://www.codeproject.com/KB/graphics/CBitmapEx.aspx</a><!-- m -->\n\nJames",
"time": "22:49",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "James Bott"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "A first prototype, though still is not properly working. Feedback is welcome <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\ntest.prg\n[code=fw:3h1xbn0p]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oBmp<br /><br /> <span style=\"color: #B900B9;\">// DEFINE BITMAP oBmp FILENAME \"c:\\fwh\\bitmaps\\about.bmp\" // No alpha</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> BITMAP oBmp FILENAME <span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\A</span>lphaBmp<span style=\"color: #000000;\">\\t</span>rash.bmp\"</span> <span style=\"color: #B900B9;\">// with alpha</span><br /><br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> HasAlpha<span style=\"color: #000000;\">(</span> oBmp:<span style=\"color: #000000;\">hBitmap</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <br /> oBmp:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <hbapi.h><br /><span style=\"color: #00D7D7;\">#include</span> <windows.h><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> HASALPHA <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HBITMAP hBmp = <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /> HDC hDC = GetDC<span style=\"color: #000000;\">(</span> GetDesktopWindow<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> BITMAPINFO bmi; <br /> void * bits;<br /> unsigned long ul; <br /> BOOL bAlpha = <span style=\"color: #00C800;\">FALSE</span>;<br /><br /> memset<span style=\"color: #000000;\">(</span> &bmi, <span style=\"color: #000000;\">0</span>, sizeof<span style=\"color: #000000;\">(</span> BITMAPINFO <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>; <br /> bmi.bmiHeader.biSize = sizeof<span style=\"color: #000000;\">(</span> BITMAPINFOHEADER <span style=\"color: #000000;\">)</span>; <br /><br /> GetDIBits<span style=\"color: #000000;\">(</span> hDC, hBmp, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">1</span>, <span style=\"color: #00C800;\">NULL</span>, &bmi, DIB_RGB_COLORS <span style=\"color: #000000;\">)</span>; <br /><br /> <span style=\"color: #B900B9;\">// hb_retnl( bmi.bmiHeader.biSize );</span><br /><br /> bits = hb_xgrab<span style=\"color: #000000;\">(</span> bmi.bmiHeader.biSize <span style=\"color: #000000;\">)</span>; <br /><br /> GetDIBits<span style=\"color: #000000;\">(</span> hDC, hBmp, <span style=\"color: #000000;\">0</span>, bmi.bmiHeader.biHeight, &bits, &bmi, DIB_RGB_COLORS <span style=\"color: #000000;\">)</span>; <br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> ul = <span style=\"color: #000000;\">0</span>; ul < bmi.bmiHeader.biSize; ul += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> char * <span style=\"color: #000000;\">)</span> bits <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">[</span> ul + <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> bAlpha = <span style=\"color: #00C800;\">TRUE</span>; <br /><br /> hb_xfree<span style=\"color: #000000;\">(</span> bits <span style=\"color: #000000;\">)</span>;<br /><br /> ReleaseDC<span style=\"color: #000000;\">(</span> GetDesktopWindow<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hDC <span style=\"color: #000000;\">)</span>;<br /> <br /> hb_retl<span style=\"color: #000000;\">(</span> bAlpha <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span> <br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP<br /> </div>[/code:3h1xbn0p]",
"time": "00:18",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "There was a bug in the code. Still it is not working properly:\n\ntest.prg\n[code=fw:23vjt9t0]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oBmp<br /><br /> <span style=\"color: #B900B9;\">// DEFINE BITMAP oBmp FILENAME \"c:\\fwh\\bitmaps\\about.bmp\" // No alpha</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> BITMAP oBmp FILENAME <span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\A</span>lphaBmp<span style=\"color: #000000;\">\\t</span>rash.bmp\"</span> <span style=\"color: #B900B9;\">// with alpha</span><br /><br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> HasAlpha<span style=\"color: #000000;\">(</span> oBmp:<span style=\"color: #000000;\">hBitmap</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <br /> oBmp:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <hbapi.h><br /><span style=\"color: #00D7D7;\">#include</span> <windows.h><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> HASALPHA <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HBITMAP hBmp = <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /> HDC hDC = GetDC<span style=\"color: #000000;\">(</span> GetDesktopWindow<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> BITMAPINFO bmi; <br /> void * bits;<br /> unsigned long ul; <br /> BOOL bAlpha = <span style=\"color: #00C800;\">FALSE</span>;<br /><br /> memset<span style=\"color: #000000;\">(</span> &bmi, <span style=\"color: #000000;\">0</span>, sizeof<span style=\"color: #000000;\">(</span> BITMAPINFO <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>; <br /> bmi.bmiHeader.biSize = sizeof<span style=\"color: #000000;\">(</span> BITMAPINFOHEADER <span style=\"color: #000000;\">)</span>; <br /><br /> GetDIBits<span style=\"color: #000000;\">(</span> hDC, hBmp, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">1</span>, <span style=\"color: #00C800;\">NULL</span>, &bmi, DIB_RGB_COLORS <span style=\"color: #000000;\">)</span>; <br /><br /> bits = hb_xgrab<span style=\"color: #000000;\">(</span> bmi.bmiHeader.biSizeImage <span style=\"color: #000000;\">)</span>; <br /><br /> GetDIBits<span style=\"color: #000000;\">(</span> hDC, hBmp, <span style=\"color: #000000;\">0</span>, bmi.bmiHeader.biHeight, &bits, &bmi, DIB_RGB_COLORS <span style=\"color: #000000;\">)</span>; <br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> ul = <span style=\"color: #000000;\">0</span>; ul < bmi.bmiHeader.biSize; ul += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> char * <span style=\"color: #000000;\">)</span> bits <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">[</span> ul + <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> bAlpha = <span style=\"color: #00C800;\">TRUE</span>; <br /><br /> hb_xfree<span style=\"color: #000000;\">(</span> bits <span style=\"color: #000000;\">)</span>;<br /><br /> ReleaseDC<span style=\"color: #000000;\">(</span> GetDesktopWindow<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hDC <span style=\"color: #000000;\">)</span>;<br /> <br /> hb_retl<span style=\"color: #000000;\">(</span> bAlpha <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span> <br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP<br /> </div>[/code:23vjt9t0]",
"time": "00:26",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Another bug fixed. Still no properly working:\n\ntest.prg\n[code=fw:2yzsw0v6]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oBmp<br /><br /> <span style=\"color: #B900B9;\">// DEFINE BITMAP oBmp FILENAME \"c:\\fwh\\bitmaps\\about.bmp\" // No alpha</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> BITMAP oBmp FILENAME <span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\A</span>lphaBmp<span style=\"color: #000000;\">\\e</span>xplorer.bmp\"</span> <span style=\"color: #B900B9;\">// with alpha</span><br /><br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> HasAlpha<span style=\"color: #000000;\">(</span> oBmp:<span style=\"color: #000000;\">hBitmap</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <br /> oBmp:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <hbapi.h><br /><span style=\"color: #00D7D7;\">#include</span> <windows.h><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> HASALPHA <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HBITMAP hBmp = <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /> HDC hDC = GetDC<span style=\"color: #000000;\">(</span> GetDesktopWindow<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> BITMAPINFO bmi; <br /> void * bits;<br /> unsigned long ul; <br /> BOOL bAlpha = <span style=\"color: #00C800;\">FALSE</span>;<br /><br /> memset<span style=\"color: #000000;\">(</span> &bmi, <span style=\"color: #000000;\">0</span>, sizeof<span style=\"color: #000000;\">(</span> BITMAPINFO <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>; <br /> bmi.bmiHeader.biSize = sizeof<span style=\"color: #000000;\">(</span> BITMAPINFOHEADER <span style=\"color: #000000;\">)</span>; <br /><br /> GetDIBits<span style=\"color: #000000;\">(</span> hDC, hBmp, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">1</span>, <span style=\"color: #00C800;\">NULL</span>, &bmi, DIB_RGB_COLORS <span style=\"color: #000000;\">)</span>; <br /><br /> bits = hb_xgrab<span style=\"color: #000000;\">(</span> bmi.bmiHeader.biSizeImage <span style=\"color: #000000;\">)</span>; <br /><br /> GetDIBits<span style=\"color: #000000;\">(</span> hDC, hBmp, <span style=\"color: #000000;\">0</span>, bmi.bmiHeader.biHeight, &bits, &bmi, DIB_RGB_COLORS <span style=\"color: #000000;\">)</span>; <br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> ul = <span style=\"color: #000000;\">0</span>; ul < bmi.bmiHeader.biSizeImage; ul += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> char * <span style=\"color: #000000;\">)</span> bits <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">[</span> ul + <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> bAlpha = <span style=\"color: #00C800;\">TRUE</span>; <br /><br /> hb_xfree<span style=\"color: #000000;\">(</span> bits <span style=\"color: #000000;\">)</span>;<br /><br /> ReleaseDC<span style=\"color: #000000;\">(</span> GetDesktopWindow<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hDC <span style=\"color: #000000;\">)</span>;<br /> <br /> hb_retl<span style=\"color: #000000;\">(</span> bAlpha <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span> <br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP<br /> </div>[/code:2yzsw0v6]",
"time": "00:34",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear Mr.Antonio,\n\nReally appreciate your effort. <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\n HasAlpha( oBmp:hBitmap ) is returning .F. eventhough the Bitmap c:\\fwh\\bitmaps\\AlphaBmp\\explorer.bmp contains AlphaChannel. Hope that we will be able to solve this bug very soon.\n\nRegards\n\nAnser",
"time": "05:19",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "anserkk"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-28",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Lets see if we get an answer from the Microsoft GDI group:\n\n<!-- m --><a class=\"postlink\" href=\"http://groups.google.es/group/microsoft.public.win32.programmer.gdi/browse_thread/thread/155a0727604bf930?hl=es#\">http://groups.google.es/group/microsoft ... 930?hl=es#</a><!-- m -->\n\nAlso in the FreeImage forum:\n\n<!-- m --><a class=\"postlink\" href=\"https://sourceforge.net/forum/forum.php?thread_id=3148220&forum_id=36111\">https://sourceforge.net/forum/forum.php ... m_id=36111</a><!-- m -->",
"time": "22:29",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-29",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Got it !!! <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\nPlease add this function in FWH\\source\\winapi\\dibbmp.c \n[code=fw:3tm3x43g]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />CLIPPER HASALPHA<span style=\"color: #000000;\">(</span> PARAMS <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// hBitmap --> lYesNo</span><br /><span style=\"color: #000000;\">{</span><br /> HANDLE hDib = DibFromBitmap<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> _parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <br /> <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> _parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> BOOL bAlphaChannel = <span style=\"color: #00C800;\">FALSE</span>;<br /> <br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> LPBITMAPINFO lpbmi = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span>;<br /> unsigned char * uc = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi <span style=\"color: #000000;\">)</span>;<br /> unsigned long ul;<br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> ul = <span style=\"color: #000000;\">0</span>; ul < lpbmi->bmiHeader.biSizeImage; ul += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> uc<span style=\"color: #000000;\">[</span> ul + <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> bAlphaChannel = <span style=\"color: #00C800;\">TRUE</span>; <br /><br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <br /> _retl<span style=\"color: #000000;\">(</span> bAlphaChannel <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span> <br /> </div>[/code:3tm3x43g]",
"time": "13:28",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-29",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Here you have a self contained working example. I appreciate your feedback testing different bitmaps with/without alpha channel, thanks! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\ntest.prg\n[code=fw:cpykpc99]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oBmp<br /><br /> <span style=\"color: #B900B9;\">// DEFINE BITMAP oBmp FILENAME \"c:\\fwh\\bitmaps\\arrow.bmp\" // No alpha</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> BITMAP oBmp FILENAME <span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\A</span>lphaBmp<span style=\"color: #000000;\">\\w</span>orld.bmp\"</span> <span style=\"color: #B900B9;\">// with alpha</span><br /><br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> HasAlpha<span style=\"color: #000000;\">(</span> oBmp:<span style=\"color: #000000;\">hBitmap</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /> oBmp:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <windows.h><br /><span style=\"color: #00D7D7;\">#include</span> <hbapi.h><br /><br />WORD DibNumColors<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span>;<br />HANDLE DibFromBitmap<span style=\"color: #000000;\">(</span> HBITMAP, DWORD, WORD, HPALETTE <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #00C800;\">static</span> WORD PaletteSize<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPBITMAPINFOHEADER lpbi = <span style=\"color: #000000;\">(</span> LPBITMAPINFOHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">pv</span>;<br /> WORD NumColors = DibNumColors<span style=\"color: #000000;\">(</span> lpbi <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> lpbi->biSize == sizeof<span style=\"color: #000000;\">(</span> BITMAPCOREHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBTRIPLE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBQUAD <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> HASALPHA <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// hBitmap --> lYesNo</span><br /><span style=\"color: #000000;\">{</span><br /> HANDLE hDib = DibFromBitmap<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <br /> <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> BOOL bAlphaChannel = <span style=\"color: #00C800;\">FALSE</span>;<br /> <br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> LPBITMAPINFO lpbmi = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span>;<br /> unsigned char * uc = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi <span style=\"color: #000000;\">)</span>;<br /> unsigned long ul;<br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> ul = <span style=\"color: #000000;\">0</span>; ul < lpbmi->bmiHeader.biSizeImage; ul += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> uc<span style=\"color: #000000;\">[</span> ul + <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> bAlphaChannel = <span style=\"color: #00C800;\">TRUE</span>; <br /><br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <br /> hb_retl<span style=\"color: #000000;\">(</span> bAlphaChannel <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span> <br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP<br /> </div>[/code:cpykpc99]",
"time": "13:41",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-29",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Congratulations that you finally got it.\nHere is a small program using the above code to check all bitmap files in any selected folder and show which bitmaps have alpha channel and which do not.\n[code=fw:3713dd5e]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> cDir := cGetDir<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"Bitmap Directory\"</span>, <span style=\"color: #ff0000;\">\"c:<span style=\"color: #000000;\">\\f</span>wh<span style=\"color: #000000;\">\\b</span>itmaps\"</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">local</span> aDir, aAlpha := <span style=\"color: #000000;\">{</span><span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">local</span> n, oBmp<br /><br /> aDir := Directory<span style=\"color: #000000;\">(</span> cDir + <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\*</span>.bmp\"</span> <span style=\"color: #000000;\">)</span><br /> aEval<span style=\"color: #000000;\">(</span> aDir, <span style=\"color: #000000;\">{</span> |a| AAdd<span style=\"color: #000000;\">(</span> aAlpha, <span style=\"color: #000000;\">{</span> cDir + <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\\"</span> + a[ 1 ], \"</span>no alpha<span style=\"color: #ff0000;\">\" } ) } )<br /><br /> for n := 1 to Len( aAlpha )<br /> DEFINE BITMAP oBmp FILENAME aAlpha[ n ][ 1 ]<br /> if HasAlpha( oBmp:hBitmap )<br /> aAlpha[ n ][ 2 ] := \"</span>HAS ALPHA<span style=\"color: #ff0000;\">\"<br /> endif<br /> oBmp:End()<br /> next n<br /> xbrowse( aAlpha, cDir )<br /><br /><br />return nil<br /><br /><br />#pragma BEGINDUMP<br /><br />#include <windows.h><br />#include <hbapi.h><br /><br />WORD DibNumColors( void * pv );<br />HANDLE DibFromBitmap( HBITMAP, DWORD, WORD, HPALETTE );<br /><br />static WORD PaletteSize( void * pv )<br />{<br /> LPBITMAPINFOHEADER lpbi = ( LPBITMAPINFOHEADER ) pv;<br /> WORD NumColors = DibNumColors( lpbi );<br /><br /> if( lpbi->biSize == sizeof( BITMAPCOREHEADER ) )<br /> return ( WORD )( NumColors * sizeof( RGBTRIPLE ) );<br /> else<br /> return ( WORD )( NumColors * sizeof( RGBQUAD ) );<br />}<br /><br />HB_FUNC( HASALPHA ) // hBitmap --> lYesNo<br />{<br /> HANDLE hDib = DibFromBitmap( ( HBITMAP ) hb_parnl( 1 ), 0, 0,<br /> ( HPALETTE ) hb_parnl( 2 ) );<br /> BOOL bAlphaChannel = FALSE;<br /><br /> if( hDib )<br /> {<br /> LPBITMAPINFO lpbmi = ( LPBITMAPINFO ) GlobalLock( hDib );<br /> unsigned char * uc = ( LPBYTE ) lpbmi + ( WORD ) lpbmi->bmiHeader.biSize + PaletteSize( lpbmi );<br /> unsigned long ul;<br /><br /> for( ul = 0; ul < lpbmi->bmiHeader.biSizeImage; ul += 4 )<br /> if( uc[ ul + 3 ] != 0 )<br /> bAlphaChannel = TRUE;<br /><br /> GlobalUnlock( hDib );<br /> }<br /><br /> hb_retl( bAlphaChannel );<br />}<br /><br /><br />#pragma ENDDUMP<br /><br /></span></div>[/code:3713dd5e]\nCompile run and see the results in xbrowse for all bitmaps",
"time": "14:40",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "nageswaragunupudi"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-30",
"forum": "FiveWin for Harbour/xHarbour",
"text": "We can optimize HasAlpha() this way:\n\n for( ul = 0; ul < lpbmi->bmiHeader.biSizeImage && ! bAlphaChannel; ul += 4 )\n\nso there is no need to step through the whole array of bytes, once we find one that matches what we are looking for <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "01:50",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "Antonio Linares"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-03-30",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear Mr.Antonio & Mr.Nageshwara Rao,\n\nI have tested my Application's Images folder wich contains BMP's with and without AlphaChannels and the new function HasAlpha is working perfectly. \n\nI tried to upload a screen snapshot using Imageshack but right now here unable to upload using ImageShack. Don't know the reason. After browsing the pic and click upload, ImageShack say's \"no files uploaded\"\n\nAnyway HasAlpha is working perfectly\n\nRegards\n\nAnser",
"time": "06:20",
"topic": "Alpha-Blended-BMP => the easy way",
"username": "anserkk"
}
] |
Alpha-Blended-BMP => the easy way
|
[
{
"date": "2009-09-20",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Is it possible to paint a alpha-blended-bmp on a panel.\nBest regards,\nOtto",
"time": "22:49",
"topic": "Alpha-Blended-BMP on Panel",
"username": "Otto"
}
] |
Alpha-Blended-BMP on Panel
|
[
{
"date": "2009-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Otto,\n\nA possible Solution, how to do it ( My new VTitle-Painter will be finished in a short Time ) : \n\nFor placing the BMP(s), start with a BORDER\n( Testalig.prg from FWH\\samples\\ )\n\nVTitle -> TOP = 0, will be Bottom of Buttonbar\n\n[img:xwx19p25]http://www.pflegeplus.com/pictures/panelbmp0.jpg[/img:xwx19p25]\n\nDelete the BORDER ( Result )\n\n[img:xwx19p25]http://www.pflegeplus.com/pictures/panelbmp1.jpg[/img:xwx19p25]\n\nAdd NOBORDER to the Title, after You are finished, with placing/adjust the BMP-Position inside the Panel. \n\nfunction Main()\nlocal oBar, oPanel, oLbx, oTabs\nlocal cItem\n\nDEFINE WINDOW oWnd TITLE \"FiveWin Automatic Alignment capabilities\"\n\nDEFINE BUTTONBAR oBar _3D SIZE 33, 33 OF oWnd\n\nDEFINE BUTTON OF oBar\nDEFINE BUTTON OF oBar\n\n#ifndef __XPP__\noPanel = TPanel():New()\n#else\noPanel = TPanel():New():_New()\n#endif\n\noWnd:oClient = oPanel // It is the client control of oWnd\n\n@ 0, 0 LISTBOX oLbx VAR cItem ;\nITEMS { \"One\", \"Two\", \"Three\" } SIZE 200, 100 OF oPanel\n\noPanel:oLeft = oLbx\n\n@ 4, 0 TABS oTabs PROMPT \"&One\", \"&Two\", \"T&hree\" OF oPanel\noPanel:oBottom = oTabs\n\nSET MESSAGE OF oWnd ;\nTO \"This unique feature saves hours of work!\" NOINSET\n\nACTIVATE WINDOW oWnd ;\nON INIT SHOW_ALPHA(oPanel)\n\nreturn nil\n\n// ----------------------------\n\nFUNCTION SHOW_ALPHA(oPanel)\nLOCAL oBar1\n\nc_path := CURDRIVE() + \":\\\" + GETCURDIR() \noTextFont := TFont():New(\"Arial\", ,-20,.F.,.T. , , , ,.T. )\n\n@ 20, 250 TITLE oBar1 size 200, 120 of oPanel TRANSPARENT [color=#FF0000:xwx19p25]NOBORDER[/color:xwx19p25] \n\n@ 5, 10 TITLETEXT OF oBar1 TEXT \"Test\" FONT oTextFont COLOR 128\n@ 20, 0 TITLEIMG OF oBar1 BITMAP c_path + \"\\Images\\format.bmp\" SIZE 45, 45 REFLEX TRANSPARENT \n@ 20, 60 TITLEIMG OF oBar1 BITMAP c_path + \"\\Images\\format.bmp\" SIZE 45, 45 REFLEX TRANSPARENT \n@ 20, 120 TITLEIMG OF oBar1 BITMAP c_path + \"\\Images\\format.bmp\" SIZE 45, 45 REFLEX TRANSPARENT \n\nRETURN ( NIL )\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "11:12",
"topic": "Alpha-Blended-BMP on Panel",
"username": "ukoenig"
}
] |
Alpha-Blended-BMP on Panel
|
[
{
"date": "2009-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Uwe,\nthank you for your help.\nNow I have bitmaps on the panel.\nBest regards,\nOtto",
"time": "16:05",
"topic": "Alpha-Blended-BMP on Panel",
"username": "Otto"
}
] |
Alpha-Blended-BMP on Panel
|
[
{
"date": "2009-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Uwe,\n\ndid you every measured the speed differences between alpha blended and simple bmps.\nMaybe I am doing something wrong but it seems as a simple bmp is painting much quicker.\nWhat is your experiences?\nBest regards,\nOtto",
"time": "18:20",
"topic": "Alpha-Blended-BMP on Panel",
"username": "Otto"
}
] |
Alpha-Blended-BMP on Panel
|
[
{
"date": "2009-09-22",
"forum": "FiveWin for Harbour/xHarbour",
"text": "I think this is normal and expected.\n\nEMG",
"time": "20:06",
"topic": "Alpha-Blended-BMP on Panel",
"username": "Enrico Maria Giordano"
}
] |
Alpha-Blended-BMP on Panel
|
[
{
"date": "2012-08-23",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hola Antonio, \n\nLa versión FWH-12.07 no carga los AlphaBitmap sí éstos están incorporador en archivo RC (Compilados a Res con PellesC o WorkShop) y además se está usando una DLL con otros recursos tales como ventanas.\n\nAdjunto ejemplo:\n[code=fw:3u0w7csd]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><br /><span style=\"color: #00C800;\">Function</span> Inicio<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /> SET RESOURCES <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #ff0000;\">\"PRUEBA.DLL\"</span> <span style=\"color: #B900B9;\">// *** Si se quita la DLL funciona ??????? ***</span><br /> AcercaDe<span style=\"color: #000000;\">(</span><span style=\"color: #ff0000;\">\"Prueba001\"</span>,<span style=\"color: #ff0000;\">\"versión 001\"</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">Return</span><span style=\"color: #000000;\">(</span><span style=\"color: #00C800;\">NIL</span><span style=\"color: #000000;\">)</span><br /><br /><br />Procedure AcercaDe<span style=\"color: #000000;\">(</span>cAplica,cVersion<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">LOCAL</span> oDlg, oBmp<br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">FROM</span> <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">200</span>,<span style=\"color: #000000;\">327</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">STYLE</span> nOR<span style=\"color: #000000;\">(</span> WS_POPUP, WS_THICKFRAME,<span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// TRANSPARENT</span><br /> <span style=\"color: #0000ff;\">DEFINE</span> BITMAP oBmp <span style=\"color: #0000ff;\">OF</span> oDlg <span style=\"color: #0000ff;\">RESOURCE</span> <span style=\"color: #ff0000;\">\"Android\"</span><br /> @ <span style=\"color: #000000;\">81</span>,<span style=\"color: #000000;\">62</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"OK\"</span> <span style=\"color: #0000ff;\">OF</span> oDlg <span style=\"color: #0000ff;\">ACTION</span> oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">40</span>,<span style=\"color: #000000;\">12</span><br /> <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">CENTERED</span> <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">PAINT</span> ABPaint<span style=\"color: #000000;\">(</span>hDC,<span style=\"color: #000000;\">100</span>,<span style=\"color: #000000;\">10</span>, oBmp:<span style=\"color: #000000;\">hBitmap</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">Return</span> </div>[/code:3u0w7csd]\nPrueba1.RC\n[code=fw:3u0w7csd]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <windows.h><br /><span style=\"color: #00D7D7;\">#include</span> <commctrl.h><br /><span style=\"color: #00D7D7;\">#include</span> <richedit.h><br /><br />ANDROID BITMAP <span style=\"color: #ff0000;\">\"C:<span style=\"color: #000000;\">\\F</span>WH<span style=\"color: #000000;\">\\B</span>ITMAPS<span style=\"color: #000000;\">\\A</span>LPHABMP<span style=\"color: #000000;\">\\A</span>ndroid.bmp\"</span><br /><span style=\"color: #000000;\">1</span> MANIFEST <span style=\"color: #ff0000;\">\"themed.manifest\"</span><br /> </div>[/code:3u0w7csd]\nEsto ha funcionado [b:3u0w7csd]SIEMPRE[/b:3u0w7csd] sin ningún problema. Ahora, con la FWH-12.07 toca obligatoriamente incluírlos en la DLL. Si no usas la DLL te carga bien. Hay algún conflicto que los anula cuando están en RES y usas DLL. Por favor puedes revisar ?\n\nAquí el código completo, incluída la DLL : [url:3u0w7csd]http://www.mastersoft3000.com/publico/fivewin/fwh-12.07-fail01.zip[/url:3u0w7csd]",
"time": "19:19",
"topic": "AlphaBitmap no carga desde Recursos FWH-12.07",
"username": "Cgallegoa"
}
] |
AlphaBitmap no carga desde Recursos FWH-12.07
|
[
{
"date": "2010-03-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "ANTONIO, i HAVE THE 9.10 AND I HAVE THIS ERROR \n\nProgetto: test, Ambiente: xHarbour:\n[1]:Harbour.Exe test.prg /m /n0 /w1 /es1 /a /v /iC:\\work\\FWH\\include /iC:\\work\\xHarbour\\Include /oObj\\test.c\nxHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6633)\nCopyright 1999-2010, <!-- m --><a class=\"postlink\" href=\"http://www.xharbour.org\">http://www.xharbour.org</a><!-- m --> <!-- m --><a class=\"postlink\" href=\"http://www.harbour-project.org/\">http://www.harbour-project.org/</a><!-- m -->\nCompiling 'test.prg'...\nLines 112, Functions/Procedures 8\nGenerating C source output to 'Obj\\test.c'...\nDone.\n[1]:Bcc32.Exe -M -c -O2 -tW -v- -X -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -DHB_OS_WIN_32 -IC:\\work\\FWH\\include -Ic:\\work\\BCC55\\Include;C:\\work\\xHarbour\\Include -nG:\\BACKUP~1\\discoD\\WORK_A~1\\errori\\effetti\\Obj test.c\nBorland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland\ntest.c:\n[1]:iLink32.Exe -Gn -aa -Tpe -s @test.bcl\nTurbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland\nError: Unresolved external 'AlphaBlend' referenced from C:\\WORK\\FWH\\LIB\\FIVEHC.LIB|BRUSHES",
"time": "13:05",
"topic": "AlphaBlend ERROR IN FWC LIB ??????",
"username": "Silvio"
}
] |
AlphaBlend ERROR IN FWC LIB ??????
|
[
{
"date": "2010-03-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Dear Mr.Silvio,\n\nThe Borland Lib msimg32.lib must be missing in your link file Make file.\n\n[quote:1ugvlzm0]echo %bcdir%\\lib\\psdk\\msimg32.lib + >> b32.bc[/quote:1ugvlzm0]\n\nRegards\nAnser",
"time": "13:16",
"topic": "AlphaBlend ERROR IN FWC LIB ??????",
"username": "anserkk"
}
] |
AlphaBlend ERROR IN FWC LIB ??????
|
[
{
"date": "2010-03-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "THANKSSSSSS",
"time": "13:29",
"topic": "AlphaBlend ERROR IN FWC LIB ??????",
"username": "Silvio"
}
] |
AlphaBlend ERROR IN FWC LIB ??????
|
[
{
"date": "2009-04-11",
"forum": "FiveWin for Pocket PC",
"text": "We have found that some versions of Windows Mobile support AlphaBlend().\n\nIn order to check if your Windows Mobile or Windows CE supports it, please build and run the following test. A zero means it is not supported\n\ntest.prg\n[code=fw:1kpryw3w]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FWCE.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">(</span> Test<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><br /><span style=\"color: #00D7D7;\">#include</span> <hbapi.h><br /><span style=\"color: #00D7D7;\">#include</span> <windows.h><br /><br />LPWSTR AnsiToWide<span style=\"color: #000000;\">(</span> char * <span style=\"color: #000000;\">)</span>;<br /><br />HMODULE GetProcAddressW<span style=\"color: #000000;\">(</span> HMODULE, LPWSTR <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> TEST <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPWSTR pW1 = AnsiToWide<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"coredll.dll\"</span> <span style=\"color: #000000;\">)</span>;<br /> LPWSTR pW2 = AnsiToWide<span style=\"color: #000000;\">(</span> <span style=\"color: #ff0000;\">\"AlphaBlend\"</span> <span style=\"color: #000000;\">)</span>;<br /> HMODULE hDll = LoadLibrary<span style=\"color: #000000;\">(</span> pW1 <span style=\"color: #000000;\">)</span>;<br /><br /> hb_retnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> LONG <span style=\"color: #000000;\">)</span> GetProcAddressW<span style=\"color: #000000;\">(</span> hDll, pW2 <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /> hb_xfree<span style=\"color: #000000;\">(</span> pW1 <span style=\"color: #000000;\">)</span>;<br /> hb_xfree<span style=\"color: #000000;\">(</span> pW2 <span style=\"color: #000000;\">)</span>;<br /> FreeLibrary<span style=\"color: #000000;\">(</span> hDll <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP<br /> </div>[/code:1kpryw3w]",
"time": "10:47",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Antonio Linares"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-04-11",
"forum": "FiveWin for Pocket PC",
"text": "Finally we got AlphaBlend support no matter if it is not supported by Windows Mobile or WinCE ! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nFWPPC has FWH ABPaint() too <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nTestAB.prg\n[code=fw:36qqcjgl]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FWCE.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><br /> <span style=\"color: #00C800;\">local</span> oWnd, oBmp, oBmp2<br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> BITMAP oBmp FILENAME CurDir<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\T</span>rash.bmp\"</span><br /><br /> <span style=\"color: #0000ff;\">DEFINE</span> BITMAP oBmp2 FILENAME CurDir<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\p</span>aper2.bmp\"</span><br /> <br /> <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd<br /> <br /> <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd ;<br /> <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">PAINT</span> <span style=\"color: #000000;\">(</span> DrawBitmap<span style=\"color: #000000;\">(</span> hDC, oBmp2:<span style=\"color: #000000;\">hBitmap</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>, ABPaint<span style=\"color: #000000;\">(</span> hDC, <span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">10</span>, oBmp:<span style=\"color: #000000;\">hBitmap</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /> </div>[/code:36qqcjgl]\nIn Windows Mobile:\n[img:36qqcjgl]http://img13.imageshack.us/img13/8753/35298621.png[/img:36qqcjgl]\nIn Windows CE:\n[img:36qqcjgl]http://img13.imageshack.us/img13/163/10541224.png[/img:36qqcjgl]",
"time": "14:47",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Antonio Linares"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-04-19",
"forum": "FiveWin for Pocket PC",
"text": "Hello Antonio,\nwhich version of FWPPC has ABPaint?\nBest regards,\nOtto\n error LNK2001: unresolved external symbol HB_FUN_ABPAINT",
"time": "21:54",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Otto"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-04-21",
"forum": "FiveWin for Pocket PC",
"text": "Otto,\n\nWe plan to publish a new FWPPC build that will include it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nIn the meantime, we may provide you the required modules for you to test it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "08:39",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Antonio Linares"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-08-28",
"forum": "FiveWin for Pocket PC",
"text": "Antonio ,\nI runned your functio to chech if my smathphone have alpphablend system.\nthe msginfo return a number:66410360.\nIf you my smarthphone support alpha blend system?\nI think it depend if on our system is loaded microsoft compact framework or not.\nOn wm 5.0 (on another smarthphone Htc TNT I) there is a net cf 1.0 and the ceck function return 0.\nOn my smathphone (htc tnt II ) there is now net cf 3.5 and the chech return the number 66410360.",
"time": "01:19",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Silvio"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-08-28",
"forum": "FiveWin for Pocket PC",
"text": "Silvio,\n\nFWPPC ABPaint() function runs on all Windows versions <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nIt is a self contained C function, no need for Windows to support it.",
"time": "08:53",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Antonio Linares"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-08-28",
"forum": "FiveWin for Pocket PC",
"text": "Hello Antonio:\n[quote=\"Antonio Linares\":j634yi0y]It is a self contained C function, no need for Windows to support it.[/quote:j634yi0y]\n\nWould you please to send me the required files to test it ?, thanks in advance.\n\nBest regards\n\nManuel Mercado\nmy email: manuelmercado @ prodigy.net.mx",
"time": "19:36",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "mmercado"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-08-30",
"forum": "FiveWin for Pocket PC",
"text": "Antonio,\nMy fwppc not have ABPaint() function!\nIt is the same of fwh?",
"time": "08:09",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Silvio"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-08-30",
"forum": "FiveWin for Pocket PC",
"text": "This is the source code for ABPaint() for FWPPC:\n[code=fw:23w2jgyf]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />BOOL AlphaBlendU<span style=\"color: #000000;\">(</span> HDC dcDest, int x, int y, int cx, int cy,<br /> HDC dcSrc, int sx, int sy, int scx, int scy, int alpha <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> BITMAPINFOHEADER BMI;<br /> BYTE * pSrcBits;<br /> HBITMAP hbmSrc;<br /> BYTE * pDestBits;<br /> HBITMAP hbmDest;<br /> HDC dc;<br /> HBITMAP dcOld;<br /> int j, i;<br /><br /> <span style=\"color: #B900B9;\">// Fill in the header info.</span><br /> BMI.biSize = sizeof<span style=\"color: #000000;\">(</span>BITMAPINFOHEADER<span style=\"color: #000000;\">)</span>;<br /> BMI.biWidth = cx;<br /> BMI.biHeight = cy;<br /> BMI.biPlanes = <span style=\"color: #000000;\">1</span>;<br /> BMI.biBitCount = <span style=\"color: #000000;\">32</span>;<br /> BMI.biCompression = BI_RGB; <span style=\"color: #B900B9;\">// No compression</span><br /> BMI.biSizeImage = <span style=\"color: #000000;\">0</span>;<br /> BMI.biXPelsPerMeter = <span style=\"color: #000000;\">0</span>;<br /> BMI.biYPelsPerMeter = <span style=\"color: #000000;\">0</span>;<br /> BMI.biClrUsed = <span style=\"color: #000000;\">0</span>; <span style=\"color: #B900B9;\">// Always use the whole palette.</span><br /> BMI.biClrImportant = <span style=\"color: #000000;\">0</span>;<br /><br /> <span style=\"color: #B900B9;\">// Create DIB section in shared memory</span><br /> hbmSrc = CreateDIBSection <span style=\"color: #000000;\">(</span>dcSrc, <span style=\"color: #000000;\">(</span>BITMAPINFO *<span style=\"color: #000000;\">)</span>&BMI,<br /> DIB_RGB_COLORS, <span style=\"color: #000000;\">(</span>void **<span style=\"color: #000000;\">)</span>&pSrcBits, <span style=\"color: #000000;\">0</span>, 0l<span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">// Create DIB section in shared memory</span><br /> hbmDest = CreateDIBSection <span style=\"color: #000000;\">(</span>dcDest, <span style=\"color: #000000;\">(</span>BITMAPINFO *<span style=\"color: #000000;\">)</span>&BMI,<br /> DIB_RGB_COLORS, <span style=\"color: #000000;\">(</span>void **<span style=\"color: #000000;\">)</span>&pDestBits, <span style=\"color: #000000;\">0</span>, 0l<span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">// Copy our source and destination bitmaps onto our DIBSections,</span><br /> <span style=\"color: #B900B9;\">// so we can get access to their bits using the BYTE *'s we</span><br /> <span style=\"color: #B900B9;\">// passed into CreateDIBSection</span><br /> dc = CreateCompatibleDC<span style=\"color: #000000;\">(</span><span style=\"color: #00C800;\">NULL</span><span style=\"color: #000000;\">)</span>;<br /><br /> dcOld = <span style=\"color: #000000;\">(</span>HBITMAP<span style=\"color: #000000;\">)</span> SelectObject<span style=\"color: #000000;\">(</span>dc, hbmSrc<span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span> <span style=\"color: #000000;\">(</span>!StretchBlt<span style=\"color: #000000;\">(</span>dc, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, cx, cy, dcSrc, sx, sy,<br /> scx, scy, SRCCOPY<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">FALSE</span>;<br /><br /> SelectObject<span style=\"color: #000000;\">(</span> dc, hbmDest <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> !StretchBlt<span style=\"color: #000000;\">(</span> dc, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, cx, cy, dcDest, x, y, cx, cy, SRCCOPY <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">FALSE</span>;<br /><br /> SelectObject<span style=\"color: #000000;\">(</span> dc, dcOld <span style=\"color: #000000;\">)</span>;<br /> DeleteDC<span style=\"color: #000000;\">(</span> dc <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> j = <span style=\"color: #000000;\">0</span>; j < cy; ++j <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> LPBYTE pbDestRGB = <span style=\"color: #000000;\">(</span>LPBYTE<span style=\"color: #000000;\">)</span>&<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">(</span>DWORD*<span style=\"color: #000000;\">)</span>pDestBits<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">[</span>j * cx<span style=\"color: #000000;\">]</span>;<br /> LPBYTE pbSrcRGB = <span style=\"color: #000000;\">(</span>LPBYTE<span style=\"color: #000000;\">)</span>&<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">(</span>DWORD*<span style=\"color: #000000;\">)</span>pSrcBits<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">[</span>j * cx<span style=\"color: #000000;\">]</span>;<br /><br /> unsigned char a1, a2;<br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> i = <span style=\"color: #000000;\">0</span>; i < cx; ++i <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a1 = pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> a1 != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a1 = alpha * <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> a1 * <span style=\"color: #000000;\">100</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">100</span>;<br /> a2 = <span style=\"color: #000000;\">255</span> - a1;<br /><br /> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> pbDestRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span> * a2 <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span> * a1 <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> >> <span style=\"color: #000000;\">8</span>;<br /> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> pbDestRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> * a2 <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> * a1 <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> >> <span style=\"color: #000000;\">8</span>;<br /> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> pbDestRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> * a2 <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> * a1 <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> >> <span style=\"color: #000000;\">8</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span> = pbDestRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">]</span>;<br /> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> = pbDestRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span>;<br /> pbSrcRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> = pbDestRGB<span style=\"color: #000000;\">[</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span>;<br /> <span style=\"color: #000000;\">}</span><br /> pbSrcRGB += <span style=\"color: #000000;\">4</span>;<br /> pbDestRGB += <span style=\"color: #000000;\">4</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> dc = CreateCompatibleDC<span style=\"color: #000000;\">(</span> <span style=\"color: #00C800;\">NULL</span> <span style=\"color: #000000;\">)</span>;<br /><br /> dcOld = <span style=\"color: #000000;\">(</span>HBITMAP<span style=\"color: #000000;\">)</span> SelectObject<span style=\"color: #000000;\">(</span>dc, hbmSrc<span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span> <span style=\"color: #000000;\">(</span>!BitBlt<span style=\"color: #000000;\">(</span>dcDest, x, y, cx, cy, dc, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, SRCCOPY<span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">)</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">FALSE</span>;<br /><br /> DeleteDC<span style=\"color: #000000;\">(</span>dc<span style=\"color: #000000;\">)</span>;<br /> DeleteObject<span style=\"color: #000000;\">(</span>hbmSrc<span style=\"color: #000000;\">)</span>;<br /> DeleteObject<span style=\"color: #000000;\">(</span>hbmDest<span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">TRUE</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> ABPAINT <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HDC hDC = <span style=\"color: #000000;\">(</span> HDC <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /> HDC hDCComp = CreateCompatibleDC<span style=\"color: #000000;\">(</span> hDC <span style=\"color: #000000;\">)</span>;<br /> BITMAP bm;<br /> HGDIOBJ hOldBmp = SelectObject<span style=\"color: #000000;\">(</span> hDCComp, <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /> GetObject<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>, sizeof<span style=\"color: #000000;\">(</span> BITMAP <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> LPSTR <span style=\"color: #000000;\">)</span> &bm <span style=\"color: #000000;\">)</span>;<br /> AlphaBlendU<span style=\"color: #000000;\">(</span> hDC, hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span>, hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>, bm.bmWidth, bm.bmHeight, hDCComp,<br /> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, bm.bmWidth, bm.bmHeight, hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">5</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /> SelectObject<span style=\"color: #000000;\">(</span> hDCComp, hOldBmp <span style=\"color: #000000;\">)</span>;<br /> DeleteDC<span style=\"color: #000000;\">(</span> hDCComp <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /> </div>[/code:23w2jgyf]\nExample:\n[code=fw:23w2jgyf]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />ABPaint<span style=\"color: #000000;\">(</span> hDC, <span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">10</span>, hBitmap, <span style=\"color: #000000;\">200</span> <span style=\"color: #000000;\">)</span><br /> </div>[/code:23w2jgyf]\nscreenshot using ABPaint() with FWPPC in Windows Mobile:\n[img:23w2jgyf]http://img405.imageshack.us/img405/9905/capturel.jpg[/img:23w2jgyf]",
"time": "08:44",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Antonio Linares"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-08-30",
"forum": "FiveWin for Pocket PC",
"text": "thanks Antonio.\nIsee your sample picture...how you made these buttons?",
"time": "12:03",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Silvio"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2009-08-30",
"forum": "FiveWin for Pocket PC",
"text": "Silvio,\n\nA graphics designer did them using photoshop",
"time": "13:16",
"topic": "AlphaBlend in Windows Mobile / WinCE",
"username": "Antonio Linares"
}
] |
AlphaBlend in Windows Mobile / WinCE
|
[
{
"date": "2011-09-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi everyone,\nI have a little problem with this BMP:\n[url:25nknsyr]http://www.mayapos.com/FiveWin/claudia.bmp[/url:25nknsyr]\n\nBecause when I activate AlphaChannel with Axialis IconWorkshop, It's shown like this:\n\n[img:25nknsyr]http://www.mayapos.com/FiveWin/foto1.bmp[/img:25nknsyr]\n\nI tried this code before converting the image to alpha channel:\n[code=fw:25nknsyr]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">IMAGE</span> oImage FILE <span style=\"color: #ff0000;\">'<span style=\"color: #000000;\">\\M</span>ayaPOS<span style=\"color: #000000;\">\\g</span>raficos<span style=\"color: #000000;\">\\C</span>amareros<span style=\"color: #000000;\">\\C</span>LAUDIA.bmp'</span> <br />msgalert<span style=\"color: #000000;\">(</span> HasAlpha<span style=\"color: #000000;\">(</span> oImage:<span style=\"color: #000000;\">hBitmap</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> </div>[/code:25nknsyr]\nAnd It returns .F. \n\nI tried to convert it and show it with BtnBmp and with @X,Y IMAGE, Transparent and not Transparent, and it's the same...\n\nAfter conversion, the image it's Ok if I open it with Paint or Axialis or Windows Image Viewer, what could be the problem???",
"time": "00:07",
"topic": "AlphaChannel BMP Problem!!!!",
"username": "Bayron"
}
] |
AlphaChannel BMP Problem!!!!
|
[
{
"date": "2011-09-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Done some test, and I think it has to be something with the AlphaChannel class or functions, because I tried:\n\nSave it with Paint\nSave it with Axialis\nCopy image from web page \nand copy with print screen and paste it to Paint\n\nIt looks something color specific on this image... I don't supply the images to the costumer and it's imposibble to check every one, what can I do???",
"time": "00:25",
"topic": "AlphaChannel BMP Problem!!!!",
"username": "Bayron"
}
] |
AlphaChannel BMP Problem!!!!
|
[
{
"date": "2011-09-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Byron,\n\nto display the Image, there is no Reason, to add a Alpha-channel,\nbut if You want to include it, You can use < [color=#FF0000:2t6k6gp0]Pixelformer[/color:2t6k6gp0] >\n\n1. Menu [color=#0000FF:2t6k6gp0]File[/color:2t6k6gp0] => [color=#FF0000:2t6k6gp0]Import[/color:2t6k6gp0] ( Your Image )\n2. Menu [color=#0000FF:2t6k6gp0]Image => Properties [/color:2t6k6gp0]=> [color=#FF0000:2t6k6gp0]change to RgbColor with Alphachannel ( 32bpp )[/color:2t6k6gp0]\n3. Menu [color=#0000FF:2t6k6gp0]File => Export [/color:2t6k6gp0]( new Image-name )\n4. activate in [color=#0000FF:2t6k6gp0]Dialog BMP-options [/color:2t6k6gp0]=> [color=#FF0000:2t6k6gp0]Premultiplied Alpha[/color:2t6k6gp0]\n\nWith this Program You will get the needed Result.\n<!-- m --><a class=\"postlink\" href=\"http://www.qualibyte.com/pixelformer/\">http://www.qualibyte.com/pixelformer/</a><!-- m -->\n\n[img:2t6k6gp0]http://www.pflegeplus.com/pictures/claudia.jpg[/img:2t6k6gp0]\n\nThe generated Source from the Screenshot above :\n\n[code=fw:2t6k6gp0]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"Image.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"ttitle.ch\"</span><br /><br /><span style=\"color: #00C800;\">STATIC</span> oWnd<br /><br /><span style=\"color: #00C800;\">FUNCTION</span> MAIN<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span><br /><span style=\"color: #00C800;\">LOCAL</span> oBtn1, oBtn2<br /><br />SET _3DLOOK <span style=\"color: #0000ff;\">ON</span><br />SetBalloon<span style=\"color: #000000;\">(</span> .T. <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// Balloon shape required for tooltips</span><br /><br /><span style=\"color: #00C800;\">PUBLIC</span> c_path := CURDRIVE<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span> + <span style=\"color: #ff0000;\">\":<span style=\"color: #000000;\">\\\"</span> + GETCURDIR() <br />PUBLIC nSWidth := GetSysMetrics(0), nSHeight := GetSysMetrics(1)<br />PUBLIC oSysfont1 := TFont():New( \"</span>Arial<span style=\"color: #ff0000;\">\", 0, 16,.F.,.T., 0, 0, 0,.F.,.F.)<br />PUBLIC oHeadFont := TFont():New( \"</span>Arial<span style=\"color: #ff0000;\">\",0 ,-22,.F.,.T.,0 ,0,0,.F.,.F.)<br />PUBLIC oTextFont := TFont():New( \"</span>Arial<span style=\"color: #ff0000;\">\",0 ,-18,.F.,.T.,0 ,0,0,.F.,.F.)<br /><br />DEFINE WINDOW oWnd ;<br />FROM 30, 30 TO 500, 700 PIXEL TITLE \"</span>Mesage and <span style=\"color: #0000ff;\">xBrowse</span><span style=\"color: #ff0000;\">\"<br /><br />SHOW_MSG(oWnd) <br /><br />@ nSHeight - 160, nSWidth - 200 BTNBMP oBtn2 SIZE 150, 60 OF oWnd 2007 ;<br />FILENAME c_path + \"</span>\\<span style=\"color: #0000ff;\">Bitmaps</span>\\quit.bmp<span style=\"color: #ff0000;\">\" ;<br />LEFT ;<br />PROMPT \"</span> &Exit <span style=\"color: #ff0000;\">\" ;<br />FONT oSysfont1 ;<br />ACTION oWnd:End()<br />oBtn2:lTransparent = .t.<br />oBtn2:cTooltip := { \"</span>Close<span style=\"color: #ff0000;\">\" + CRLF + ;<br /> \"</span>Message-test<span style=\"color: #ff0000;\">\",\"</span>Close <span style=\"color: #0000ff;\">Window</span><span style=\"color: #ff0000;\">\", 1, CLR_BLACK, 14089979 }<br /><br />ACTIVATE WINDOW oWnd MAXIMIZED ;<br />ON INIT WND_BRUSH( oWnd, \"</span>FANTASY3.JPG <span style=\"color: #ff0000;\">\" )<br /><br />oSysFont1:End()<br />CLOSE DATABASE<br /><br />RETURN NIL<br /><br />//-----------------<br /><br />FUNCTION WND_BRUSH( cControl, cImage )<br />LOCAL hDC, oBrush<br /><br />IF File( c_path + \"</span>\\<span style=\"color: #0000ff;\">bitmaps</span>\\<span style=\"color: #ff0000;\">\" + cImage )<br /> DEFINE BRUSH oBrush FILE c_path + \"</span>\\<span style=\"color: #0000ff;\">Bitmaps</span>\\<span style=\"color: #ff0000;\">\" + cImage<br /> SET BRUSH OF cControl TO oBrush<br /> RELEASE BRUSH oBrush<br />ELSE<br /> MsgAlert( \"</span>Cannot load : <span style=\"color: #ff0000;\">\" + CRLF + ;<br /> c_path + \"</span>\\<span style=\"color: #0000ff;\">bitmaps</span>\\<span style=\"color: #ff0000;\">\" + cDImage, \"</span>Error<span style=\"color: #ff0000;\">\" )<br />ENDIF<br /><br />RETURN NIL<br /><br />// ----------------------<br /><br />FUNCTION SHOW_MSG( oControl )<br />LOCAL oBar1<br /><br /><br />@ 60, 50 TITLE oBar1 SIZE 350, 250 OF oControl SHADOW BOTTOMRIGHT SHADOWSIZE 14<br /><br />@ 15, 140 TITLETEXT oTitle OF oBar1 TEXT \"</span>About-<span style=\"color: #0000ff;\">message</span><span style=\"color: #ff0000;\">\" FONT oHeadFont COLOR 65535<br /><br />@ 52, 140 TITLETEXT oText1 OF oBar1 TEXT \"</span><span style=\"color: #00C800;\">New</span> Line <span style=\"color: #000000;\">1</span><span style=\"color: #ff0000;\">\" FONT oTextFont COLOR 16776960<br />@ 85, 140 TITLETEXT oText2 OF oBar1 TEXT \"</span>Line <span style=\"color: #000000;\">2</span><span style=\"color: #ff0000;\">\" FONT oTextFont COLOR 16776960<br /><br />@ 20, 20 TITLEIMG oBmp1 OF oBar1 BITMAP c_Path + \"</span>\\<span style=\"color: #0000ff;\">Bitmaps</span>\\CLAUDIA1.BMP<span style=\"color: #ff0000;\">\" SIZE 95, 120 ANIMA LEVEL 255 ;<br />ACTION ( NIL)<br /><br />oBar1:lRound := .T.<br />oBar1:lBorder := .T.<br />oBar1:nClrLine1 := 255<br /><br />IF FILE( c_Path + \"</span>\\<span style=\"color: #0000ff;\">Bitmaps</span>\\FANTASY1.JPG<span style=\"color: #ff0000;\">\" )<br /> oBar1:aGrdBack := {}<br /> DEFINE BRUSH oBrush FILENAME c_Path + \"</span>\\<span style=\"color: #0000ff;\">Bitmaps</span>\\FANTASY1.JPG<span style=\"color: #ff0000;\">\"<br /> SET BRUSH OF oBar1 TO oBrush:Resized( 350, 250, 1 )<br /> RELEASE BRUSH oBrush<br />ELSE<br /> MsgAlert( \"</span>File : <span style=\"color: #000000;\">FANTASY1</span>.JPG<span style=\"color: #ff0000;\">\" + CRLF + ;<br /> \"</span>does not exist<span style=\"color: #ff0000;\">\" + CRLF + ; <br /> \"</span><span style=\"color: #0000ff;\">to</span> create <span style=\"color: #0000ff;\">Brush</span> !<span style=\"color: #ff0000;\">\", \"</span>ATTENTION<span style=\"color: #ff0000;\">\" ) <br />ENDIF<br /><br />@ 191, 291 BTNBMP oBtn OF oBar1 ;<br />SIZE 40, 45 PIXEL;<br />NOBORDER ;<br />PROMPT \"</span>&OK<span style=\"color: #ff0000;\">\" ;<br />FILENAME c_path + \"</span>\\<span style=\"color: #0000ff;\">Bitmaps</span>\\Btn1.bmp<span style=\"color: #ff0000;\">\" ;<br />ACTION oWnd:End() ;<br />FONT oSysFont1 ;<br />CENTER<br />oBtn:lTransparent := .t.<br />oBtn:cToolTip = { \"</span>Close <span style=\"color: #ff0000;\">\" + CRLF + \"</span><span style=\"color: #0000ff;\">Message</span><span style=\"color: #ff0000;\">\",\"</span><span style=\"color: #0000ff;\">Message</span> End<span style=\"color: #ff0000;\">\", 1, CLR_BLACK, 14089979 }<br />oBtn:SetColor( 0, )<br /><br />RETURN( NIL )<br /></span></div>[/code:2t6k6gp0]\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "01:30",
"topic": "AlphaChannel BMP Problem!!!!",
"username": "ukoenig"
}
] |
AlphaChannel BMP Problem!!!!
|
[
{
"date": "2011-09-10",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Thanks Uwe, as usual all your sugestions are the best ones for me...",
"time": "18:40",
"topic": "AlphaChannel BMP Problem!!!!",
"username": "Bayron"
}
] |
AlphaChannel BMP Problem!!!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi friends,\n\nThis is my first try of an AlphaBlend funtion that works on all windows version, and can be changed to work on linux too:\n\nIt is working but need be optmized for speed:\n\n[code=fw:116dwkx1]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"windows.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbapi.h\"</span><br /><br />WORD DibNumColors<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span>;<br /><br />HANDLE DibFromBitmap<span style=\"color: #000000;\">(</span> HBITMAP, DWORD, WORD, HPALETTE <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #00C800;\">static</span> WORD PaletteSize<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPBITMAPINFOHEADER lpbi = <span style=\"color: #000000;\">(</span> LPBITMAPINFOHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">pv</span>;<br /><br /> WORD NumColors = DibNumColors<span style=\"color: #000000;\">(</span> lpbi <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> lpbi->biSize == sizeof<span style=\"color: #000000;\">(</span> BITMAPCOREHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBTRIPLE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBQUAD <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br />void DrawNewAlpha<span style=\"color: #000000;\">(</span> HDC hdc, HBITMAP hbm, int iRow, int iCol <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HANDLE hDib = DibFromBitmap<span style=\"color: #000000;\">(</span> hbm, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> COLORREF clr;<br /><br /> int i, j;<br /><br /> BYTE r, g, b;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> LPBITMAPINFO lpbmi = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span>;<br /><br /> unsigned char * uc = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi <span style=\"color: #000000;\">)</span>;<br /><br /> unsigned long ul = <span style=\"color: #000000;\">3</span>, a1, a2;<br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> j = <span style=\"color: #000000;\">0</span>; j < lpbmi->bmiHeader.biHeight; j++ <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> i = <span style=\"color: #000000;\">0</span>; i < lpbmi->bmiHeader.biWidth; i++ <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a1 = uc<span style=\"color: #000000;\">[</span> ul <span style=\"color: #000000;\">]</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> a1 != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> a1 == <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> clr = RGB<span style=\"color: #000000;\">(</span> uc<span style=\"color: #000000;\">[</span> ul - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span>, uc<span style=\"color: #000000;\">[</span> ul - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span>, uc<span style=\"color: #000000;\">[</span> ul - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span>;<br /><br /> SetPixelV<span style=\"color: #000000;\">(</span> hdc, i + iCol, lpbmi->bmiHeader.biHeight - j + iRow, clr <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> a2 = <span style=\"color: #000000;\">255</span> - a1;<br /><br /> clr = GetPixel<span style=\"color: #000000;\">(</span> hdc, i + iCol, lpbmi->bmiHeader.biHeight - j + iRow <span style=\"color: #000000;\">)</span>;<br /><br /> b = clr / <span style=\"color: #000000;\">65536</span>;<br /> g = clr / <span style=\"color: #000000;\">256</span>;<br /> r = <span style=\"color: #000000;\">(</span> clr - <span style=\"color: #000000;\">(</span> b * <span style=\"color: #000000;\">65536</span> <span style=\"color: #000000;\">)</span> - <span style=\"color: #000000;\">(</span> g * <span style=\"color: #000000;\">256</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><br /> SetPixelV<span style=\"color: #000000;\">(</span> hdc, i + iCol, lpbmi->bmiHeader.biHeight - j + iRow, RGB<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> a1 * uc<span style=\"color: #000000;\">[</span> ul - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> a2 * r <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> a1 * uc<span style=\"color: #000000;\">[</span> ul - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> a2 * g <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> a1 * uc<span style=\"color: #000000;\">[</span> ul - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> a2 * b <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> ul += <span style=\"color: #000000;\">4</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><br /> hb_retl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> NEWALPHABLEND <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> DrawNewAlpha<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HDC <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP</div>[/code:116dwkx1]\n\n\nTo test:\n\n[code=fw:116dwkx1]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> <span style=\"color: #00C800;\">local</span> hBmp := LoadBitmap<span style=\"color: #000000;\">(</span>GetResources<span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">7777</span> <span style=\"color: #000000;\">)</span><br /> NewAlphaBlend<span style=\"color: #000000;\">(</span> oDlg:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span>, hBmp, <span style=\"color: #000000;\">40</span>, <span style=\"color: #000000;\">40</span> <span style=\"color: #000000;\">)</span><br /> oDlg:<span style=\"color: #000000;\">ReleaseDC</span><span style=\"color: #000000;\">(</span><span style=\"color: #000000;\">)</span></div>[/code:116dwkx1]\n\n\nRegards,\n\nToninho.",
"time": "14:39",
"topic": "Alphablend Platform Independent Working !!!",
"username": "toninhofwi"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho,\n\nGetPixel() and SetPixel() are quite slow, you should avoid them.\n\nTo improve the speed, you have to directly access the array of bytes of the bitmap.\n\nPlease review this DrDobbs article <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) --> AlphaBlendU()\n<!-- m --><a class=\"postlink\" href=\"http://www.ddj.com/windows/184416353?pgno=21\">http://www.ddj.com/windows/184416353?pgno=21</a><!-- m -->\n\nThe Alpha Channel is not used in such code. It has to be modified to use it.",
"time": "14:46",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Antonio Linares"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Antonio Linares\":2gh0wplv]Toninho,\n\nGetPixel() and SetPixel() are quite slow, you should avoid them.\n\nTo improve the speed, you have to directly access the array of bytes of the bitmap.\n[/quote:2gh0wplv]\n\nHi Antonio. Thanks. I know it. As I say, it is my first try.\n\n[quote=\"Antonio Linares\":2gh0wplv]\nPlease review this DrDobbs article <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) --> AlphaBlendU()\n<!-- m --><a class=\"postlink\" href=\"http://www.ddj.com/windows/184416353?pgno=21\">http://www.ddj.com/windows/184416353?pgno=21</a><!-- m -->\n\nThe Alpha Channel is not used in such code. It has to be modified to use it.[/quote:2gh0wplv]\n\nThanks for the hint. I´ll try implement Alpha Channel in its code.\n\nRegards,\n\nToninho.",
"time": "15:37",
"topic": "Alphablend Platform Independent Working !!!",
"username": "toninhofwi"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho,\n\n> I´ll try implement Alpha Channel in its code.\n\nI have tried it and I have it partially working.\n\nIf you want to I can share my changes so we can work together to get it properly working <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "15:49",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Antonio Linares"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho,\n\nThe fourth byte keeps the alpha channel amount. These are my changes. They are working but the alpha level is not taken into account. We need to improve it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n[code=fw:1ws3rz8e]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />...<br /><span style=\"color: #00C800;\">for</span> <span style=\"color: #000000;\">(</span> i = <span style=\"color: #000000;\">0</span>; i < cx; ++i<span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #B900B9;\">// Alpha value</span><br /> <span style=\"color: #000000;\">{</span><br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">]</span>=<span style=\"color: #000000;\">(</span>pbDestRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">]</span> * <span style=\"color: #000000;\">(</span> alpha - pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #B900B9;\">// (255-alpha) +</span><br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">]</span> * <span style=\"color: #000000;\">(</span> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> >><span style=\"color: #000000;\">8</span>; <span style=\"color: #B900B9;\">// alpha</span><br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span>=<span style=\"color: #000000;\">(</span>pbDestRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span> * <span style=\"color: #000000;\">(</span> alpha - pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #B900B9;\">// (255-alpha) +</span><br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span> * <span style=\"color: #000000;\">(</span> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> >><span style=\"color: #000000;\">8</span>;<br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">]</span>=<span style=\"color: #000000;\">(</span>pbDestRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">]</span> * <span style=\"color: #000000;\">(</span> alpha - pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> + <span style=\"color: #B900B9;\">// (255-alpha) +</span><br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">]</span> * <span style=\"color: #000000;\">(</span> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span> >><span style=\"color: #000000;\">8</span>;<br /> <span style=\"color: #000000;\">}</span> <br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">]</span> = pbDestRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">]</span>;<br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span> = pbDestRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">]</span>;<br /> pbSrcRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">]</span> = pbDestRGB<span style=\"color: #000000;\">[</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">]</span>;<br /> <span style=\"color: #000000;\">}</span> <br /> pbSrcRGB += <span style=\"color: #000000;\">4</span>;<br /> pbDestRGB += <span style=\"color: #000000;\">4</span>;<br /> <span style=\"color: #000000;\">}</span><br />...<br /> </div>[/code:1ws3rz8e]",
"time": "15:54",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Antonio Linares"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hi Antonio.\n\nDone !!!!!!!!!!!!! In another way:\n\n[code=fw:2ry0xmsp]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"windows.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbapi.h\"</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br />WORD DibNumColors<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span>;<br /><br />HPALETTE CreateDIBPalette<span style=\"color: #000000;\">(</span> HGLOBAL hDIB <span style=\"color: #000000;\">)</span>;<br /><br />HANDLE DibFromBitmap<span style=\"color: #000000;\">(</span> HBITMAP, DWORD, WORD, HPALETTE <span style=\"color: #000000;\">)</span>;<br /><br />BOOL DibDraw<span style=\"color: #000000;\">(</span> HDC hDC, HGLOBAL hDib, WORD wCol, WORD wRow, HPALETTE hPalette, WORD wWidth, WORD wHeight, DWORD dwRop <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #00C800;\">static</span> WORD PaletteSize<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPBITMAPINFOHEADER lpbi = <span style=\"color: #000000;\">(</span> LPBITMAPINFOHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">pv</span>;<br /><br /> WORD NumColors = DibNumColors<span style=\"color: #000000;\">(</span> lpbi <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> lpbi->biSize == sizeof<span style=\"color: #000000;\">(</span> BITMAPCOREHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBTRIPLE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBQUAD <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br />void DrawNewAlpha<span style=\"color: #000000;\">(</span> HDC hDC1, HBITMAP hBitmap1, int iRow, int iCol <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HDC hDC2;<br /><br /> HANDLE hDib1, hDib2;<br /><br /> unsigned char * uc1;<br /> unsigned char * uc2;<br /><br /> unsigned long a1, a2;<br /><br /> unsigned int i1;<br /><br /> LPBITMAPINFO lpbmi1, lpbmi2;<br /><br /> HBITMAP hBitmap2, hBmpOld;<br /><br /> BITMAP bm;<br /><br /> hDC2 = CreateCompatibleDC<span style=\"color: #000000;\">(</span> hDC1 <span style=\"color: #000000;\">)</span>;<br /><br /> GetObject<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HGDIOBJ <span style=\"color: #000000;\">)</span> hBitmap1, sizeof<span style=\"color: #000000;\">(</span> BITMAP <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> LPSTR <span style=\"color: #000000;\">)</span> &bm <span style=\"color: #000000;\">)</span>;<br /><br /> hBitmap2 = CreateCompatibleBitmap<span style=\"color: #000000;\">(</span> hDC1, bm.bmWidth, bm.bmHeight <span style=\"color: #000000;\">)</span>;<br /><br /> hBmpOld = <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> SelectObject<span style=\"color: #000000;\">(</span> hDC2, hBitmap2 <span style=\"color: #000000;\">)</span>;<br /><br /> BitBlt<span style=\"color: #000000;\">(</span> hDC2, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, bm.bmWidth, bm.bmHeight, hDC1, iCol, iRow, SRCCOPY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> hDib1 = DibFromBitmap<span style=\"color: #000000;\">(</span> hBitmap1, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /> hDib2 = DibFromBitmap<span style=\"color: #000000;\">(</span> hBitmap2, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> lpbmi1 = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> lpbmi2 = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> uc1 = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi1 + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi1->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi1 <span style=\"color: #000000;\">)</span>;<br /> uc2 = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi2 + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi2->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi2 <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> i1 = <span style=\"color: #000000;\">3</span>; i1 <= lpbmi1->bmiHeader.biSizeImage; i1 += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a1 = uc1<span style=\"color: #000000;\">[</span> i1 <span style=\"color: #000000;\">]</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> a1 != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> a1 == <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> = uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> = uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> = uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> a2 = <span style=\"color: #000000;\">255</span> - a1;<br /><br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> a1 * uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> + a2 * uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> a1 * uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> + a2 * uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> a1 * uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> + a2 * uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> DibDraw<span style=\"color: #000000;\">(</span> hDC1, hDib2, iCol, iRow, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> SelectObject<span style=\"color: #000000;\">(</span> hDC2, hBmpOld <span style=\"color: #000000;\">)</span>;<br /><br /> DeleteObject<span style=\"color: #000000;\">(</span> hBitmap2 <span style=\"color: #000000;\">)</span>;<br /><br /> DeleteDC<span style=\"color: #000000;\">(</span> hDC2 <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> NEWALPHABLEND <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> DrawNewAlpha<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HDC <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP</div>[/code:2ry0xmsp]\n\n\nRegards,\n\nToninho.",
"time": "17:56",
"topic": "Alphablend Platform Independent Working !!!",
"username": "toninhofwi"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho,\n\nYou have to free the hDibs memory:\n[code=fw:2c0lb07o]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /> GlobalFree<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>; <span style=\"color: #B900B9;\">// new</span><br /> GlobalFree<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>; <span style=\"color: #B900B9;\">// new</span><br /> </div>[/code:2c0lb07o]\nYour code works fine but it does not uses an AlphaBlend transparency level. i.e.:\n\nNEWALPHABLEND( hDC, hBitmap, nRow, nCol, nSourceConstantAlpha )\nwhere nSourceConstantAlpha is in the range 0, 255.\n\nFrom Microsoft docs:\n[quote:2c0lb07o]\nSourceConstantAlpha \nSpecifies an alpha transparency value to be used on the entire source bitmap. The SourceConstantAlpha value is combined with any per-pixel alpha values in the source bitmap. If you set SourceConstantAlpha to 0, it is assumed that your image is transparent. When you only want to use per-pixel alpha values, set the SourceConstantAlpha value to 255 (opaque) .\n[/quote:2c0lb07o]",
"time": "18:58",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Antonio Linares"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hey Antonio, you are fast ! <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\nHere is the code:\n\n[code=fw:2w6n8n9t]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"windows.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbapi.h\"</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br />WORD DibNumColors<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span>;<br /><br />HPALETTE CreateDIBPalette<span style=\"color: #000000;\">(</span> HGLOBAL hDIB <span style=\"color: #000000;\">)</span>;<br /><br />HANDLE DibFromBitmap<span style=\"color: #000000;\">(</span> HBITMAP, DWORD, WORD, HPALETTE <span style=\"color: #000000;\">)</span>;<br /><br />BOOL DibDraw<span style=\"color: #000000;\">(</span> HDC hDC, HGLOBAL hDib, WORD wCol, WORD wRow, HPALETTE hPalette, WORD wWidth, WORD wHeight, DWORD dwRop <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #00C800;\">static</span> WORD PaletteSize<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPBITMAPINFOHEADER lpbi = <span style=\"color: #000000;\">(</span> LPBITMAPINFOHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">pv</span>;<br /><br /> WORD NumColors = DibNumColors<span style=\"color: #000000;\">(</span> lpbi <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> lpbi->biSize == sizeof<span style=\"color: #000000;\">(</span> BITMAPCOREHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBTRIPLE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBQUAD <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br />void DrawNewAlpha<span style=\"color: #000000;\">(</span> HDC hDC1, HBITMAP hBitmap1, int iRow, int iCol, int alpha <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HDC hDC2;<br /><br /> HANDLE hDib1, hDib2;<br /><br /> unsigned char * uc1;<br /> unsigned char * uc2;<br /><br /> unsigned long a1, a2;<br /><br /> unsigned int i1;<br /><br /> LPBITMAPINFO lpbmi1, lpbmi2;<br /><br /> HBITMAP hBitmap2, hBmpOld;<br /><br /> BITMAP bm;<br /><br /> hDC2 = CreateCompatibleDC<span style=\"color: #000000;\">(</span> hDC1 <span style=\"color: #000000;\">)</span>;<br /><br /> GetObject<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HGDIOBJ <span style=\"color: #000000;\">)</span> hBitmap1, sizeof<span style=\"color: #000000;\">(</span> BITMAP <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> LPSTR <span style=\"color: #000000;\">)</span> &bm <span style=\"color: #000000;\">)</span>;<br /><br /> hBitmap2 = CreateCompatibleBitmap<span style=\"color: #000000;\">(</span> hDC1, bm.bmWidth, bm.bmHeight <span style=\"color: #000000;\">)</span>;<br /><br /> hBmpOld = <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> SelectObject<span style=\"color: #000000;\">(</span> hDC2, hBitmap2 <span style=\"color: #000000;\">)</span>;<br /><br /> BitBlt<span style=\"color: #000000;\">(</span> hDC2, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, bm.bmWidth, bm.bmHeight, hDC1, iCol, iRow, SRCCOPY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> hDib1 = DibFromBitmap<span style=\"color: #000000;\">(</span> hBitmap1, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /> hDib2 = DibFromBitmap<span style=\"color: #000000;\">(</span> hBitmap2, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> lpbmi1 = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> lpbmi2 = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> uc1 = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi1 + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi1->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi1 <span style=\"color: #000000;\">)</span>;<br /> uc2 = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi2 + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi2->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi2 <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> alpha = <span style=\"color: #000000;\">255</span> - alpha;<br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> i1 = <span style=\"color: #000000;\">3</span>; i1 <= lpbmi1->bmiHeader.biSizeImage; i1 += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a1 = uc1<span style=\"color: #000000;\">[</span> i1 <span style=\"color: #000000;\">]</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> a1 != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a2 = <span style=\"color: #000000;\">255</span> + alpha - uc1<span style=\"color: #000000;\">[</span> i1 <span style=\"color: #000000;\">]</span>;<br /><br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> a1 * uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> + a2 * uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">255</span> + alpha <span style=\"color: #000000;\">)</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> a1 * uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> + a2 * uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">255</span> + alpha <span style=\"color: #000000;\">)</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> a1 * uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> + a2 * uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">255</span> + alpha <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> DibDraw<span style=\"color: #000000;\">(</span> hDC1, hDib2, iCol, iRow, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> GlobalFree<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> GlobalFree<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> SelectObject<span style=\"color: #000000;\">(</span> hDC2, hBmpOld <span style=\"color: #000000;\">)</span>;<br /><br /> DeleteObject<span style=\"color: #000000;\">(</span> hBitmap2 <span style=\"color: #000000;\">)</span>;<br /><br /> DeleteDC<span style=\"color: #000000;\">(</span> hDC2 <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> NEWALPHABLEND <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> DrawNewAlpha<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HDC <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">55</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP</div>[/code:2w6n8n9t]\n\nThe last param of DrawNewAlpha() accept valus from 0 to 255. 255 is full and 0 is transparent.\n\nRegards,\n\nToninho.",
"time": "19:31",
"topic": "Alphablend Platform Independent Working !!!",
"username": "toninhofwi"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho,\n\nIt is getting better <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nI would use:\n[code=fw:lqasuy43]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> NEWALPHABLEND <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> DrawNewAlpha<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HDC <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>, hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">5</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /> </div>[/code:lqasuy43]\nAnyhow if you use a zero alpha value, the bitmap should not be seen. With your code, still it is seen.\n\nI think that you are quite close to have it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->",
"time": "20:16",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Antonio Linares"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Antonio Linares\":d1t303hs]Toninho,\n\nIt is getting better <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nAnyhow if you use a zero alpha value, the bitmap should not be seen. With your code, still it is seen.\n\nI think that you are quite close to have it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->[/quote:d1t303hs]\n\nAntonio, Thanks.\n\nI´ll see it tonight and post here.\n\nBut I´m trying to use crestostr() without success, can you please review this FWH function? I´m trying in this way:\n\n? Len( cResToStr( 7777, 2 ) ) // 7777 is my resource, 2 is RT_BITMAP\n\nRegards,\n\nToninho.",
"time": "20:30",
"topic": "Alphablend Platform Independent Working !!!",
"username": "toninhofwi"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-16",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho,\n\n> ? Len( cResToStr( 7777, 2 ) ) // 7777 is my resource, 2 is RT_BITMAP\n\nActually cResToStr() expects a string as the second parameter:\n\n? Len( cResToStr( 7777, \"BITMAP\" ) )\n\nWe have to modify cResToStr() to accept numbers also.",
"time": "20:44",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Antonio Linares"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote=\"Antonio Linares\":2n3n4kbv]Toninho,\nIt is getting better <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\nAnyhow if you use a zero alpha value, the bitmap should not be seen. With your code, still it is seen.\nI think that you are quite close to have it <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->[/quote:2n3n4kbv]\n\nDONE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n[code=fw:2n3n4kbv]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">// Alphablend platform independent</span><br /><span style=\"color: #B900B9;\">// works in all windows versions</span><br /><span style=\"color: #B900B9;\">// <!-- e --><a href=\"mailto:Toninho@fwi.com.br\">Toninho@fwi.com.br</a><!-- e --></span><br /><span style=\"color: #B900B9;\">// Ver 1.05 - Apr 2009</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> BEGINDUMP<br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"windows.h\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbapi.h\"</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br />WORD DibNumColors<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span>;<br /><br />HPALETTE CreateDIBPalette<span style=\"color: #000000;\">(</span> HGLOBAL hDIB <span style=\"color: #000000;\">)</span>;<br /><br />HANDLE DibFromBitmap<span style=\"color: #000000;\">(</span> HBITMAP, DWORD, WORD, HPALETTE <span style=\"color: #000000;\">)</span>;<br /><br />BOOL DibDraw<span style=\"color: #000000;\">(</span> HDC hDC, HGLOBAL hDib, WORD wCol, WORD wRow, HPALETTE hPalette, WORD wWidth, WORD wHeight, DWORD dwRop <span style=\"color: #000000;\">)</span>;<br /><br /><span style=\"color: #00C800;\">static</span> WORD PaletteSize<span style=\"color: #000000;\">(</span> void * <span style=\"color: #0000ff;\">pv</span> <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> LPBITMAPINFOHEADER lpbi = <span style=\"color: #000000;\">(</span> LPBITMAPINFOHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #0000ff;\">pv</span>;<br /><br /> WORD NumColors = DibNumColors<span style=\"color: #000000;\">(</span> lpbi <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> lpbi->biSize == sizeof<span style=\"color: #000000;\">(</span> BITMAPCOREHEADER <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBTRIPLE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #00C800;\">else</span><br /> <span style=\"color: #000000;\">{</span><br /> <span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span><span style=\"color: #000000;\">(</span> NumColors * sizeof<span style=\"color: #000000;\">(</span> RGBQUAD <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /> <span style=\"color: #000000;\">}</span><br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br />void DrawNewAlpha<span style=\"color: #000000;\">(</span> HDC hDC1, HBITMAP hBitmap1, int iRow, int iCol, int alpha <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> HDC hDC2;<br /><br /> HANDLE hDib1, hDib2;<br /><br /> unsigned char * uc1;<br /> unsigned char * uc2;<br /><br /> unsigned long a1, a2;<br /><br /> unsigned int i1;<br /><br /> LPBITMAPINFO lpbmi1, lpbmi2;<br /><br /> HBITMAP hBitmap2, hBmpOld;<br /><br /> BITMAP bm;<br /><br /> hDC2 = CreateCompatibleDC<span style=\"color: #000000;\">(</span> hDC1 <span style=\"color: #000000;\">)</span>;<br /><br /> GetObject<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HGDIOBJ <span style=\"color: #000000;\">)</span> hBitmap1, sizeof<span style=\"color: #000000;\">(</span> BITMAP <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> LPSTR <span style=\"color: #000000;\">)</span> &bm <span style=\"color: #000000;\">)</span>;<br /><br /> hBitmap2 = CreateCompatibleBitmap<span style=\"color: #000000;\">(</span> hDC1, bm.bmWidth, bm.bmHeight <span style=\"color: #000000;\">)</span>;<br /><br /> hBmpOld = <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> SelectObject<span style=\"color: #000000;\">(</span> hDC2, hBitmap2 <span style=\"color: #000000;\">)</span>;<br /><br /> BitBlt<span style=\"color: #000000;\">(</span> hDC2, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, bm.bmWidth, bm.bmHeight, hDC1, iCol, iRow, SRCCOPY <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> hDib1 = DibFromBitmap<span style=\"color: #000000;\">(</span> hBitmap1, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /> hDib2 = DibFromBitmap<span style=\"color: #000000;\">(</span> hBitmap2, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">(</span> HPALETTE <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> lpbmi1 = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> lpbmi2 = <span style=\"color: #000000;\">(</span> LPBITMAPINFO <span style=\"color: #000000;\">)</span> GlobalLock<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> uc1 = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi1 + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi1->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi1 <span style=\"color: #000000;\">)</span>;<br /> uc2 = <span style=\"color: #000000;\">(</span> LPBYTE <span style=\"color: #000000;\">)</span> lpbmi2 + <span style=\"color: #000000;\">(</span> WORD <span style=\"color: #000000;\">)</span> lpbmi2->bmiHeader.biSize + PaletteSize<span style=\"color: #000000;\">(</span> lpbmi2 <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> <span style=\"color: #00C800;\">for</span><span style=\"color: #000000;\">(</span> i1 = <span style=\"color: #000000;\">3</span>; i1 <= lpbmi1->bmiHeader.biSizeImage; i1 += <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a1 = uc1<span style=\"color: #000000;\">[</span> i1 <span style=\"color: #000000;\">]</span>;<br /><br /> <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">(</span> a1 != <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span><br /> <span style=\"color: #000000;\">{</span><br /> a1 = alpha * <span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> uc1<span style=\"color: #000000;\">[</span> i1 <span style=\"color: #000000;\">]</span> * <span style=\"color: #000000;\">100</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">)</span> / <span style=\"color: #000000;\">100</span>;<br /><br /> a2 = <span style=\"color: #000000;\">255</span> - a1;<br /><br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> * a1 <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">]</span> * a2 <span style=\"color: #000000;\">)</span> >> <span style=\"color: #000000;\">8</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> * a1 <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">]</span> * a2 <span style=\"color: #000000;\">)</span> >> <span style=\"color: #000000;\">8</span>;<br /> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> = <span style=\"color: #000000;\">(</span> uc1<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> * a1 <span style=\"color: #000000;\">)</span> + <span style=\"color: #000000;\">(</span> uc2<span style=\"color: #000000;\">[</span> i1 - <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">]</span> * a2 <span style=\"color: #000000;\">)</span> >> <span style=\"color: #000000;\">8</span>;<br /><br /> <span style=\"color: #000000;\">}</span><br /> <span style=\"color: #000000;\">}</span><br /><br /> DibDraw<span style=\"color: #000000;\">(</span> hDC1, hDib2, iCol, iRow, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">)</span>;<br /><br /> <span style=\"color: #B900B9;\">//---------------------------------------------------------------------------------------------------------------//</span><br /><br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> GlobalUnlock<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> GlobalFree<span style=\"color: #000000;\">(</span> hDib1 <span style=\"color: #000000;\">)</span>;<br /> GlobalFree<span style=\"color: #000000;\">(</span> hDib2 <span style=\"color: #000000;\">)</span>;<br /><br /> SelectObject<span style=\"color: #000000;\">(</span> hDC2, hBmpOld <span style=\"color: #000000;\">)</span>;<br /><br /> DeleteObject<span style=\"color: #000000;\">(</span> hBitmap2 <span style=\"color: #000000;\">)</span>;<br /><br /> DeleteDC<span style=\"color: #000000;\">(</span> hDC2 <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">HB_FUNC</span><span style=\"color: #000000;\">(</span> NEWALPHABLEND <span style=\"color: #000000;\">)</span><br /><span style=\"color: #000000;\">{</span><br /> DrawNewAlpha<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">(</span> HDC <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">)</span>, <span style=\"color: #000000;\">(</span> HBITMAP <span style=\"color: #000000;\">)</span> hb_parnl<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">)</span>, hb_parni<span style=\"color: #000000;\">(</span> <span style=\"color: #000000;\">5</span> <span style=\"color: #000000;\">)</span> <span style=\"color: #000000;\">)</span>;<br /><span style=\"color: #000000;\">}</span><br /><br /><span style=\"color: #B900B9;\">//------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00D7D7;\">#pragma</span> ENDDUMP</div>[/code:2n3n4kbv]\n\n\nRegards,\n\nToninho.",
"time": "01:56",
"topic": "Alphablend Platform Independent Working !!!",
"username": "toninhofwi"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho,\n\nVery good! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nCongratulations!",
"time": "09:22",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Antonio Linares"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-04-17",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Toninho...\n\nGreat... thanks for your efforts...\n\nI'll try it right away..\n\n\nFrom Chile\nAdolfo",
"time": "14:43",
"topic": "Alphablend Platform Independent Working !!!",
"username": "Adolfo"
}
] |
Alphablend Platform Independent Working !!!
|
[
{
"date": "2009-01-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "HOw Create a Alphablended-BMP from a normal bmp?",
"time": "20:14",
"topic": "Alphablended-BMP",
"username": "Silvio"
}
] |
Alphablended-BMP
|
[
{
"date": "2009-01-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "[quote:2167lou5]May 2008\n========\n\n* New: AlphaBlending transparencies support for FiveWin! Please review samples\\TestAB.prg for a working sample. In bitmaps\\AlphaBmp\\*.bmp there are several bitmaps with alpha channel. Please review this video to learn how to build bitmaps with alpha channel:\n<!-- m --><a class=\"postlink\" href=\"http://www.dailymotion.com/fivetech/video/8852204\">http://www.dailymotion.com/fivetech/video/8852204</a><!-- m --> [/quote:2167lou5]\n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=17&t=13192&start=0\">viewtopic.php?f=17&t=13192&start=0</a><!-- l -->",
"time": "20:27",
"topic": "Alphablended-BMP",
"username": "Daniel Garcia-Gil"
}
] |
Alphablended-BMP
|
[
{
"date": "2009-01-26",
"forum": "FiveWin for Harbour/xHarbour",
"text": "Hello Silvio,\n\nto convert a BMP to Alpha-Blended-BMP doesn't make sense.\nBasicly You have to use / convert a PNG-file ( with Shadows, Transparent-areas )\nto a Alpha-Blended-BMP. A PNG-file contains LAYERS. The Layer of the transparent-area\nof a PNG-file is converted to BLACK during saving as BMP.\nUsing a normal BMP ( with no separated transparent-areas ),there is nothing to convert. \nYou can convert a PNG-file to BMP-Alphablended easily with a normal Graphic-application \nlike < GIMP > or < XNVIEW >.\nLoad the PNG-file and save it a Alpha-Blended-BMP.\nIf You need some spezial PNG's, Just tell me, what You need ( motive / color ).\nI have a big collection of all kind and sizes of PNG's.\n\nRegards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->",
"time": "22:35",
"topic": "Alphablended-BMP",
"username": "ukoenig"
}
] |
Alphablended-BMP
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Ruben... \n\nese problema fue correjido para esa version...\n\nintenta usar este patch: [url:1igcid5c]http://forums.fivetechsupport.com/viewtopic.php?p=112262#p112262[/url:1igcid5c]",
"time": "17:44",
"topic": "Alquien Le ha pasado Esto",
"username": "Daniel Garcia-Gil"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Todas las pantallas me aparece al final de titulo un simbolo. Uso Pelles Windows XP\n\n[img]\n<!-- m --><a class=\"postlink\" href=\"http://imageshack.us/photo/my-images/148/error3y.jpg/\">http://imageshack.us/photo/my-images/148/error3y.jpg/</a><!-- m -->\n[/img]\nSer Imagen\n[img]\n<!-- m --><a class=\"postlink\" href=\"http://imageshack.us/photo/my-images/268/error2u.jpg/\">http://imageshack.us/photo/my-images/268/error2u.jpg/</a><!-- m -->\n[/img]",
"time": "17:27",
"topic": "Alquien Le ha pasado Esto",
"username": "ruben Dario"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Ruben\n\nque version de fivewin estas usando?",
"time": "17:29",
"topic": "Alquien Le ha pasado Esto",
"username": "Daniel Garcia-Gil"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "[quote=\"Daniel Garcia-Gil\":2gq7cafh]Ruben\n\nque version de fivewin estas usando?[/quote:2gq7cafh]\n\nLa 11.03",
"time": "17:33",
"topic": "Alquien Le ha pasado Esto",
"username": "ruben Dario"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "[quote=\"Daniel Garcia-Gil\":1wu74d1z]Ruben... \n\nese problema fue correjido para esa version...\n\nintenta usar este patch: [url:1wu74d1z]http://forums.fivetechsupport.com/viewtopic.php?p=112262#p112262[/url:1wu74d1z][/quote:1wu74d1z]\n\nGracias , Voy a Probarlo",
"time": "17:57",
"topic": "Alquien Le ha pasado Esto",
"username": "ruben Dario"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "[quote=\"Daniel Garcia-Gil\":1d74up4y]Ruben... \n\nese problema fue correjido para esa version...\n\nintenta usar este patch: [url:1d74up4y]http://forums.fivetechsupport.com/viewtopic.php?p=112262#p112262[/url:1d74up4y][/quote:1d74up4y]\n\n\nFunciona pero me le quita la ultima lectra al texto.\nCodigo lo escribe como Codig\n\n[img]\n<!-- m --><a class=\"postlink\" href=\"http://imageshack.us/photo/my-images/219/error4.jpg/\">http://imageshack.us/photo/my-images/219/error4.jpg/</a><!-- m -->\n[/img]",
"time": "18:11",
"topic": "Alquien Le ha pasado Esto",
"username": "ruben Dario"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Ruben,...\n\nes raro, pq ese patch evita justamente que suceda eso... verifica que lo estes agregrando antes de las librerias de fivewin",
"time": "18:31",
"topic": "Alquien Le ha pasado Esto",
"username": "Daniel Garcia-Gil"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-07",
"forum": "FiveWin para Harbour/xHarbour",
"text": "[size=85:tjd6df7v][quote=\"ruben Dario\":tjd6df7v]Funciona pero me le quita la ultima lectra al texto.[/quote:tjd6df7v][/size:tjd6df7v]\nY si le añades un ESPACIO al final de cada texto, será eso lo que quite ¿no?",
"time": "23:32",
"topic": "Alquien Le ha pasado Esto",
"username": "JmGarcia"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-06-08",
"forum": "FiveWin para Harbour/xHarbour",
"text": "[quote=\"JmGarcia\":1482on6q][size=85:1482on6q][quote=\"ruben Dario\":1482on6q]Funciona pero me le quita la ultima lectra al texto.[/quote:1482on6q][/size:1482on6q]\nY si le añades un ESPACIO al final de cada texto, será eso lo que quite ¿no?[/quote:1482on6q]\n\nCreo que no es la solucion , en realidad tengo muchas pantallas.",
"time": "23:19",
"topic": "Alquien Le ha pasado Esto",
"username": "ruben Dario"
}
] |
Alquien Le ha pasado Esto
|
[
{
"date": "2011-04-18",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Alquien esta Usando MariaDB el reemplazo de Mysql, ya que tengo entendido compro a Mysql y desde el 2015 deja de ser gratuito.",
"time": "17:25",
"topic": "Alquien esta Usando MariaDB el reemplazo de Mysql",
"username": "ruben Dario"
}
] |
Alquien esta Usando MariaDB el reemplazo de Mysql
|
[
{
"date": "2011-04-18",
"forum": "FiveWin para Harbour/xHarbour",
"text": "Hice unas pruebs y funciona bien,,, aun sigo usando MySQL,pero segun el autor, MariaDB es \"compatible\" con MySQL,,,,\nSalu2",
"time": "17:43",
"topic": "Alquien esta Usando MariaDB el reemplazo de Mysql",
"username": "Willi Quintana"
}
] |
Alquien esta Usando MariaDB el reemplazo de Mysql
|
[
{
"date": "2011-04-18",
"forum": "FiveWin para Harbour/xHarbour",
"text": "La ultima version de MARIADB 5.2.5 es 1000% compatible con todo lo de MYSQL 5.5.11 GA ( COmmunity server)\nSean Conectores, Odbc, apis etc etc.\n\nSaludos\n\nRevisa aqui...\n\n<!-- m --><a class=\"postlink\" href=\"http://kb.askmonty.org/v/mariadb-versus-mysql-compatibility\">http://kb.askmonty.org/v/mariadb-versus ... patibility</a><!-- m -->\n\nDesde Chile",
"time": "22:13",
"topic": "Alquien esta Usando MariaDB el reemplazo de Mysql",
"username": "Adolfo"
}
] |
Alquien esta Usando MariaDB el reemplazo de Mysql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.