Thread overview | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
April 03, 2005 libpng libjpg | ||||
---|---|---|---|---|
| ||||
I've made imageio.d and imageio.lib which has libpng(+zlib) libjpeg inside and I am going to publish the whole project in a week or two. Meantime if anybody needs them now just drop me a message imageio.lib compiled using dmc and make file provided imageio.d file is simple: -------------------------- module imageio.imageio; version (Windows) { pragma(lib, "imageio\\imageio.lib"); } // weird , Windows supports / in paths else { pragma(lib, "imageio/imageio.lib"); } // PNG and JPEG image decoder/encoder library extern (C) { // callback image ctor alias int function(void* prm, uint width, uint height, int bytesPerPixel, ubyte** rowPtrs) ImageCtor; // image decoder by itself int DecodeImage(ImageCtor pctor, void* pctorPrm, ubyte* src, uint srcLength); } ---EOF----------------- Fragment of real code which uses it and creates Win32 DIB: extern(C) int DibCtor(void* pctorPrm, uint width, uint height, int bytesPerPixel, ubyte** rowPtrs) { Dib im = cast(Dib)pctorPrm; im.init(size(width,height),bytesPerPixel); for(int i = 0; i < height; ++i) rowPtrs[i] = im.rowBytes(i).ptr; return 1; } class Dib { .... // creates Dib from PNG or JPEG encoded bytes. static Dib create(ubyte[] bytes) { Dib d = new Dib(); if(d.DecodeImage(&DibCtor, d, bytes.ptr, bytes.length)) return d; delete d; return null; } // loads Dib from PNG/JPG file static Dib load(char[] path) { .... } } |
April 05, 2005 screenshot | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk | Here is a screenshot of PNG with alpha rendering in D http://terrainformatica.com/screenshots/smileui.png As you may see image rendered on top of input widgets. |
April 06, 2005 Re: screenshot | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk | Cool!
Andrew Fedoniouk wrote:
> Here is a screenshot of PNG with alpha rendering in D
> http://terrainformatica.com/screenshots/smileui.png
> As you may see image rendered on top of input widgets.
>
>
|
April 06, 2005 Re: screenshot | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk | Is that the HTML GUI ? Looks promising! Charlie "Andrew Fedoniouk" <news@terrainformatica.com> wrote in message news:d2v5ug$5to$1@digitaldaemon.com... > Here is a screenshot of PNG with alpha rendering in D > http://terrainformatica.com/screenshots/smileui.png > As you may see image rendered on top of input widgets. > > |
April 07, 2005 Re: screenshot | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charlie | > Is that the HTML GUI ? Looks promising!
Solely HTML GUI is unpractical. Too many reasons.
Embedded HTML used as universal layout manager and simple viewer
of e.g. html documents (help, tooltip) does make sense.
In short : use cases are similar to what XUL (Mozilla) is used for
currently.
In any case it will be reduced HTML tightly integrated with the rest of the
framework.
E.g. it will be possible to say:
hPanel.load(
"<p>And your age is: " ~ new NumericBox(0,150) ~ " years</p>");
Andrew.
|
April 08, 2005 Re: screenshot | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk |
And how do I get a hold of this library? :-)
Andrew Fedoniouk says...
>
>> Is that the HTML GUI ? Looks promising!
>
>Solely HTML GUI is unpractical. Too many reasons.
>Embedded HTML used as universal layout manager and simple viewer
>of e.g. html documents (help, tooltip) does make sense.
>In short : use cases are similar to what XUL (Mozilla) is used for
>currently.
>
>In any case it will be reduced HTML tightly integrated with the rest of the
>framework.
>E.g. it will be possible to say:
>
>hPanel.load(
>"<p>And your age is: " ~ new NumericBox(0,150) ~ " years</p>");
>
>Andrew.
>
>
|
April 08, 2005 Re: screenshot | ||||
---|---|---|---|---|
| ||||
Posted in reply to jicman | In a week or two I hope to publish it. Only win32 version for a while. |
April 08, 2005 Re: screenshot | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk |
That's ok, that's what I want it for, anyway. ;-)
Andrew Fedoniouk says...
>
>In a week or two I hope to publish it.
>Only win32 version for a while.
>
>
|
April 13, 2005 screenshot #2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk | Tables and simple styles are pretty much done: http://www.terrainformatica.com/screenshots/smileui.png |
April 13, 2005 Re: screenshot #2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Fedoniouk | The one where the parrot was in front of the box was cooler!
Still, congratulations! Keep up this _excellent_ work!
Andrew Fedoniouk wrote:
> Tables and simple styles are pretty much done:
> http://www.terrainformatica.com/screenshots/smileui.png
>
>
>
>
|
Copyright © 1999-2021 by the D Language Foundation