December 29, 2014
On Sunday, 28 December 2014 at 19:20:53 UTC, Vadim Lopatin wrote:
> On Sunday, 28 December 2014 at 15:29:02 UTC, Jack wrote:
>> On Sunday, 28 December 2014 at 09:32:24 UTC, Vadim Lopatin wrote:
>>> On Sunday, 28 December 2014 at 06:39:24 UTC, Jack wrote:
>>> If you provide paths to some .ttf fonts under Arch, I can prepare quick fix with such hardcoded paths.
>>
>> The path to fonts in Archlinux is:
>> /usr/share/fonts/TTF/DejaVuSans.ttf
>>
>> and running the example lead to a seg fault.
>> I ran the gdb(with ddd) on it and it points to
>> line 93 of /dlangui-0.1.15/src/widgets/controls.d
>
> It crashes on null font reference - no fonts in font manager.
> Try v0.1.16 - it should work on your system.

It worked! Thank you very much.
Though I listed dlangui:dlanguilib as a dependency in my project rather than dlangui itself since the hello world started coming up again.
Anyway thank you for your hard work! Looking forward to playing with this.
December 29, 2014
On Sunday, 28 December 2014 at 20:30:53 UTC, ketmar via Digitalmars-d-announce wrote:
> On Fri, 26 Dec 2014 12:33:03 +0000
> Vadim Lopatin via Digitalmars-d-announce
> <digitalmars-d-announce@puremagic.com> wrote:
>
>> Hello!
>> 
>> DlangUI project is alive and under active development.
>> 
>> https://github.com/buggins/dlangui
>
> ah, i really love this project! it's stable as a rock: every time i
> tried it, it crashing with "exception while loading image from
> file". it's not working, but at least it's not working every time i
> check it. ;-)

Can you check once again - v0.1.16? Just in case. Probably, it's as stable as previous.
December 29, 2014
On Mon, 29 Dec 2014 04:09:41 +0000
Vadim Lopatin via Digitalmars-d-announce
<digitalmars-d-announce@puremagic.com> wrote:

> On Sunday, 28 December 2014 at 20:30:53 UTC, ketmar via Digitalmars-d-announce wrote:
> > On Fri, 26 Dec 2014 12:33:03 +0000
> > Vadim Lopatin via Digitalmars-d-announce
> > <digitalmars-d-announce@puremagic.com> wrote:
> >
> >> Hello!
> >> 
> >> DlangUI project is alive and under active development.
> >> 
> >> https://github.com/buggins/dlangui
> >
> > ah, i really love this project! it's stable as a rock: every
> > time i
> > tried it, it crashing with "exception while loading image from
> > file". it's not working, but at least it's not working every
> > time i
> > check it. ;-)
> 
> Can you check once again - v0.1.16? Just in case. Probably, it's as stable as previous.
i wrote this just after i did 'git clone' (i tend to rm it all after unsuccessfull attempt). besides the bug in src/dlangui/graphics/ftfonts.d at line 40 (extra 'const', my patched compiler is not tolerant to it), it's still the same "image error" as ever. GNU/Linux x86 is you need that info. and here's the message log:

Running ./examples/example1/bin/example1
2014-12-29 06:20:19.859 W  resource theme_default is not found
2014-12-29 06:20:19.859 E  Cannot load theme from resource theme_default - will use default theme
2014-12-29 06:20:20.092 E  exception while loading image from
file /mnt/tigerclaw/D/dlangui/examples/example1/.dub/build/application-debug-linux.posix-x86-dmd_2067-AA7A6EC68D298A63D0B7CD4C8C934A19/../../../res/mdpi/tx_fabric.jpg


December 29, 2014
On Monday, 29 December 2014 at 04:23:49 UTC, ketmar via Digitalmars-d-announce wrote:
> On Mon, 29 Dec 2014 04:09:41 +0000
> Vadim Lopatin via Digitalmars-d-announce
> <digitalmars-d-announce@puremagic.com> wrote:
>
>> On Sunday, 28 December 2014 at 20:30:53 UTC, ketmar via Digitalmars-d-announce wrote:
>> > On Fri, 26 Dec 2014 12:33:03 +0000
>> > Vadim Lopatin via Digitalmars-d-announce
>> > <digitalmars-d-announce@puremagic.com> wrote:
>> >
>> >> Hello!
>> >> 
>> >> DlangUI project is alive and under active development.
>> >> 
>> >> https://github.com/buggins/dlangui
>> >
>> > ah, i really love this project! it's stable as a rock: every time i
>> > tried it, it crashing with "exception while loading image from
>> > file". it's not working, but at least it's not working every time i
>> > check it. ;-)
>> 
>> Can you check once again - v0.1.16? Just in case. Probably, it's as stable as previous.
> i wrote this just after i did 'git clone' (i tend to rm it all after
> unsuccessfull attempt). besides the bug in
> src/dlangui/graphics/ftfonts.d at line 40 (extra 'const', my patched
> compiler is not tolerant to it), it's still the same "image error" as
> ever. GNU/Linux x86 is you need that info. and here's the message log:
>
> Running ./examples/example1/bin/example1
> 2014-12-29 06:20:19.859 W  resource theme_default is not found
> 2014-12-29 06:20:19.859 E  Cannot load theme from resource theme_default - will use default theme
> 2014-12-29 06:20:20.092 E  exception while loading image from
> file /mnt/tigerclaw/D/dlangui/examples/example1/.dub/build/application-debug-linux.posix-x86-dmd_2067-AA7A6EC68D298A63D0B7CD4C8C934A19/../../../res/mdpi/tx_fabric.jpg

Compilation is fixed.

It looks like you don't have libfreeimage installed. It causes crash.

December 29, 2014
On Mon, 29 Dec 2014 05:52:10 +0000
Vadim Lopatin via Digitalmars-d-announce
<digitalmars-d-announce@puremagic.com> wrote:

> On Monday, 29 December 2014 at 04:23:49 UTC, ketmar via Digitalmars-d-announce wrote:
> > On Mon, 29 Dec 2014 04:09:41 +0000
> > Vadim Lopatin via Digitalmars-d-announce
> > <digitalmars-d-announce@puremagic.com> wrote:
> >
> >> On Sunday, 28 December 2014 at 20:30:53 UTC, ketmar via Digitalmars-d-announce wrote:
> >> > On Fri, 26 Dec 2014 12:33:03 +0000
> >> > Vadim Lopatin via Digitalmars-d-announce
> >> > <digitalmars-d-announce@puremagic.com> wrote:
> >> >
> >> >> Hello!
> >> >> 
> >> >> DlangUI project is alive and under active development.
> >> >> 
> >> >> https://github.com/buggins/dlangui
> >> >
> >> > ah, i really love this project! it's stable as a rock: every
> >> > time i
> >> > tried it, it crashing with "exception while loading image
> >> > from
> >> > file". it's not working, but at least it's not working every
> >> > time i
> >> > check it. ;-)
> >> 
> >> Can you check once again - v0.1.16? Just in case. Probably, it's as stable as previous.
> > i wrote this just after i did 'git clone' (i tend to rm it all
> > after
> > unsuccessfull attempt). besides the bug in
> > src/dlangui/graphics/ftfonts.d at line 40 (extra 'const', my
> > patched
> > compiler is not tolerant to it), it's still the same "image
> > error" as
> > ever. GNU/Linux x86 is you need that info. and here's the
> > message log:
> >
> > Running ./examples/example1/bin/example1
> > 2014-12-29 06:20:19.859 W  resource theme_default is not found
> > 2014-12-29 06:20:19.859 E  Cannot load theme from resource
> > theme_default - will use default theme
> > 2014-12-29 06:20:20.092 E  exception while loading image from
> > file
> > /mnt/tigerclaw/D/dlangui/examples/example1/.dub/build/application-debug-linux.posix-x86-dmd_2067-AA7A6EC68D298A63D0B7CD4C8C934A19/../../../res/mdpi/tx_fabric.jpg
> 
> Compilation is fixed.
> 
> It looks like you don't have libfreeimage installed. It causes crash.
> 
wow, now it works. it's look funny without images though.

btw, i have freeimage installed, but the loader wants to find "FreeImage_ConvertToRGB16" function in it, which it seems to not even use. that's the joy of Derelict: it loads everything whether, it needs it or not.

ah, and another thing: freeimage sux for GNU/Linux. it looks completely alien and no sane GUI software requires it. i didn't looked at the code, but i hope that image loading is well abstracted in DlangUI? if it is, i can try to write a loaders for png and jpg (jpg? in GUI? holy heavens, why?!).

it's better to check if the system has the corresponding libraries with corresponding versions (imlib2 rocks, for example), but i suppose that dub cannot into configure checks, am i right?


December 29, 2014
On Monday, 29 December 2014 at 07:35:13 UTC, ketmar via Digitalmars-d-announce wrote:
> ah, and another thing: freeimage sux for GNU/Linux. it looks completely
> alien and no sane GUI software requires it. i didn't looked at the
> code, but i hope that image loading is well abstracted in DlangUI? if
> it is, i can try to write a loaders for png and jpg (jpg? in GUI? holy
> heavens, why?!).
>
> it's better to check if the system has the corresponding libraries with
> corresponding versions (imlib2 rocks, for example), but i suppose that
> dub cannot into configure checks, am i right?

Initially, I've used libpng for loading images.
But it is compatible only with some particular version of libpng.so
API version is passed somwhere in calls, and doesn't work with updated library.
I've tried to find some replacement for it, and found FreeImage (there was Derelict suport for it, and it was used in some D projects).
Probably, it makes sense to move to SDL_image. But it looks like it requires SDL as dependency.
Does it work ok on linux?
Let me check imlib2 as well.
December 29, 2014
On Monday, 29 December 2014 at 09:30:40 UTC, Vadim Lopatin wrote:
> On Monday, 29 December 2014 at 07:35:13 UTC, ketmar via Digitalmars-d-announce wrote:
>> ah, and another thing: freeimage sux for GNU/Linux. it looks completely
>> alien and no sane GUI software requires it. i didn't looked at the
>> code, but i hope that image loading is well abstracted in DlangUI? if
>> it is, i can try to write a loaders for png and jpg (jpg? in GUI? holy
>> heavens, why?!).
>>
>> it's better to check if the system has the corresponding libraries with
>> corresponding versions (imlib2 rocks, for example), but i suppose that
>> dub cannot into configure checks, am i right?
>
> Initially, I've used libpng for loading images.
> But it is compatible only with some particular version of libpng.so
> API version is passed somwhere in calls, and doesn't work with updated library.
> I've tried to find some replacement for it, and found FreeImage (there was Derelict suport for it, and it was used in some D projects).
> Probably, it makes sense to move to SDL_image. But it looks like it requires SDL as dependency.
> Does it work ok on linux?
> Let me check imlib2 as well.

BTW, there is de_image package - "Image loading and exporting Devisualization".
It's native D implementation, and possible if PNG only is enough, it makes sense to use it.
Did some try de_image?
December 29, 2014
On 29/12/2014 10:33 p.m., Vadim Lopatin wrote:
> On Monday, 29 December 2014 at 09:30:40 UTC, Vadim Lopatin wrote:
>> On Monday, 29 December 2014 at 07:35:13 UTC, ketmar via
>> Digitalmars-d-announce wrote:
>>> ah, and another thing: freeimage sux for GNU/Linux. it looks completely
>>> alien and no sane GUI software requires it. i didn't looked at the
>>> code, but i hope that image loading is well abstracted in DlangUI? if
>>> it is, i can try to write a loaders for png and jpg (jpg? in GUI? holy
>>> heavens, why?!).
>>>
>>> it's better to check if the system has the corresponding libraries with
>>> corresponding versions (imlib2 rocks, for example), but i suppose that
>>> dub cannot into configure checks, am i right?
>>
>> Initially, I've used libpng for loading images.
>> But it is compatible only with some particular version of libpng.so
>> API version is passed somwhere in calls, and doesn't work with updated
>> library.
>> I've tried to find some replacement for it, and found FreeImage (there
>> was Derelict suport for it, and it was used in some D projects).
>> Probably, it makes sense to move to SDL_image. But it looks like it
>> requires SDL as dependency.
>> Does it work ok on linux?
>> Let me check imlib2 as well.
>
> BTW, there is de_image package - "Image loading and exporting
> Devisualization".
> It's native D implementation, and possible if PNG only is enough, it
> makes sense to use it.
> Did some try de_image?

Author here.
Devisualization.Image png support is not complete.
But should be fine for RGBA images.
Interlacing is not done, however should be pretty easy to implement. I just haven't really wrapped my head around how to do and undo Adam7.

There is much more complete implementations in e.g. ae with support for jpeg, bmp, tiff ext. However my reasons for Devisualization.Image is = less code to compile in. Highly scoped.
December 29, 2014
On Mon, 29 Dec 2014 09:30:39 +0000
Vadim Lopatin via Digitalmars-d-announce
<digitalmars-d-announce@puremagic.com> wrote:

> Initially, I've used libpng for loading images.
> But it is compatible only with some particular version of
> libpng.so
yep, libpng sux too.

> Probably, it makes sense to move to SDL_image. But it looks like it requires SDL as dependency.
it would be not that hard to write a native D png loader. and, maybe, simplistic but working jpg loader, as we have jpegd and stb_image libraries, which can be easily ported. bwah, i believe that i've seen stb_image already ported.

> Does it work ok on linux?
it works ok... at least it was ok last time i checked. ;-)

> Let me check imlib2 as well.
it's a plugin-based image reading/writing library, with a very simple C interface. it can use various libraries to read png, jpeg and so on. not very popular, though.


December 29, 2014
On Monday, 29 December 2014 at 09:43:34 UTC, Rikki Cattermole wrote:
> On 29/12/2014 10:33 p.m., Vadim Lopatin wrote:
>> On Monday, 29 December 2014 at 09:30:40 UTC, Vadim Lopatin wrote:
>> BTW, there is de_image package - "Image loading and exporting
>> Devisualization".
>> It's native D implementation, and possible if PNG only is enough, it
>> makes sense to use it.
>> Did some try de_image?
>
> Author here.
> Devisualization.Image png support is not complete.
> But should be fine for RGBA images.
> Interlacing is not done, however should be pretty easy to implement. I just haven't really wrapped my head around how to do and undo Adam7.
>
> There is much more complete implementations in e.g. ae with support for jpeg, bmp, tiff ext. However my reasons for Devisualization.Image is = less code to compile in. Highly scoped.

Does de_image support PNGs with more than 256 colors?
Does it support alpha?

Interlacing is not critical for usage in GUI resources - it's always possible to open interlaced image and save as non-interlaced.

Are you planning to separate import and export operations?
E.g. possibility to build read-only configuration of library to reduce code size?

I'm going to try de_image instead of FreeImage in dlangui.