digitalmars.D.announce - libpng libjpg
- "Andrew Fedoniouk" <news terrainformatica.com> Apr 02 2005
- "Andrew Fedoniouk" <news terrainformatica.com> Apr 05 2005
- Georg Wrede <georg.wrede nospam.org> Apr 05 2005
- "Charlie" <charles jwavro.com> Apr 06 2005
- "Andrew Fedoniouk" <news terrainformatica.com> Apr 06 2005
- jicman <jicman_member pathlink.com> Apr 07 2005
- "Andrew Fedoniouk" <news terrainformatica.com> Apr 08 2005
- jicman <jicman_member pathlink.com> Apr 08 2005
- "Andrew Fedoniouk" <news terrainformatica.com> Apr 12 2005
- Georg Wrede <georg.wrede nospam.org> Apr 13 2005
- "Andrew Fedoniouk" <news terrainformatica.com> Apr 13 2005
- "Charlie" <charles jwavro.com> Apr 13 2005
- jicman <jicman_member pathlink.com> Apr 13 2005
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) { .... }
}
Apr 02 2005
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.
Apr 05 2005
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.
Apr 05 2005
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.
Apr 06 2005
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.
Apr 06 2005
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.
Apr 07 2005
In a week or two I hope to publish it. Only win32 version for a while.
Apr 08 2005
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.
Apr 08 2005
Tables and simple styles are pretty much done: http://www.terrainformatica.com/screenshots/smileui.png
Apr 12 2005
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
Apr 13 2005
The one where the parrot was in front of the box was cooler!
far. The intention is to provide a solid foundation for crossplatform UI framework (and yet practical!) and at current stage I did not finished even its basement. But it is close. "Georg Wrede" <georg.wrede nospam.org> wrote in message news:425CFFD0.9020903 nospam.org...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
Apr 13 2005
Hehe, you keep teasing us with these screen shots :S. "Andrew Fedoniouk" <news terrainformatica.com> wrote in message news:d3ibis$tuo$1 digitaldaemon.com...Tables and simple styles are pretty much done: http://www.terrainformatica.com/screenshots/smileui.png
Apr 13 2005
I agree, Charlie! He is a teaser! jic Charlie says...Hehe, you keep teasing us with these screen shots :S. "Andrew Fedoniouk" <news terrainformatica.com> wrote in message news:d3ibis$tuo$1 digitaldaemon.com...Tables and simple styles are pretty much done: http://www.terrainformatica.com/screenshots/smileui.png
Apr 13 2005









Georg Wrede <georg.wrede nospam.org> 