Jump to page: 1 2
Thread overview
libpng libjpg
Apr 03, 2005
Andrew Fedoniouk
screenshot
Apr 05, 2005
Andrew Fedoniouk
Apr 06, 2005
Georg Wrede
Apr 06, 2005
Charlie
Apr 07, 2005
Andrew Fedoniouk
Apr 08, 2005
jicman
Apr 08, 2005
Andrew Fedoniouk
Apr 08, 2005
jicman
screenshot #2
Apr 13, 2005
Andrew Fedoniouk
Apr 13, 2005
Georg Wrede
Apr 13, 2005
Andrew Fedoniouk
Apr 13, 2005
Charlie
Apr 13, 2005
jicman
April 03, 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) { .... }

}


April 05, 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.


April 06, 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.
> 
> 
April 06, 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.
>
>


April 07, 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.


April 08, 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.
>
>


April 08, 2005
In a week or two I hope to publish it.
Only win32 version for a while.


April 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.
>
>


April 13, 2005
Tables and simple styles are pretty much done: http://www.terrainformatica.com/screenshots/smileui.png




April 13, 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
> 
> 
> 
> 
« First   ‹ Prev
1 2