Board.KolibriOS.org

Official KolibriOS board
It is currently Sat Jan 16, 2021 8:52 am

All times are UTC+03:00




Post new topic  Reply to topic  [ 96 posts ]  Go to page Previous 13 4 5 6 7 Next
Author Message
 Post subject: Re: libimg
PostPosted: Sun Sep 20, 2020 5:02 pm 
Offline
Mentor
User avatar

Joined: Mon Oct 19, 2009 10:58 am
Posts: 599
Script app-dynamic.lds is not in $(SDK_DIR)/lib/ but in $(SDK_DIR)/sources/newlib/

loadboxlib.obj and other obj's needed can be compiled with fasm from source in C_Layer/ASM

I have no idea what issue you faced since you didn't provide any information.


Top
   
 Post subject: Re: libimg
PostPosted: Sun Sep 20, 2020 6:36 pm 
Offline

Joined: Mon Sep 07, 2020 7:09 pm
Posts: 351
Я сколько искал, очень маленького примерчика так и не нашел

Для TCC

Для kos32-gcc:

Attachment:
LIBIMG_gcc_SAMPLE.zip [110.82 KiB]
Downloaded 25 times

_________________
:arrow: Image


Top
   
 Post subject: Re: libimg
PostPosted: Tue Nov 17, 2020 3:26 am 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 5383
Начал мимолетное знакомство с Blender'ом и он сохранил картинку с глубиной цвета 64 бита О_о я такого раньше не встречал...
Кто-то сталкивался, зачем такое нужно?

Мне аж интересно стало открывается ли она в Колибри и таки да - открывается без проблем.
Изображения по-разному отображались на 16-битом "экране" эмулятора, но при 32 отличий не заметил.

Файлы:
https://imgur.com/a/Z2harCK

_________________
Звиздеть не мешки ворочать


Top
   
 Post subject: Re: libimg
PostPosted: Tue Nov 17, 2020 5:18 am 
Offline
Mentor
User avatar

Joined: Mon Oct 19, 2009 10:58 am
Posts: 599
Leency wrote:
Code:
$ gm identify -verbose ZAX6lLa.png | grep Depth -A4
  Depth: 8 bits-per-pixel component
  Channel Depths:
    Red:      8 bits
    Green:    8 bits
    Blue:     8 bits
    Opacity:  1 bits
   
$ gm identify -verbose tsQZcP4.png | grep Depth -A4
  Depth: 16 bits-per-pixel component
  Channel Depths:
    Red:      16 bits
    Green:    16 bits
    Blue:     16 bits
    Opacity:  1 bits

http://www.graphicsmagick.org/


Top
   
 Post subject: Re: libimg
PostPosted: Thu Nov 19, 2020 6:01 pm 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 5383
Ок, зачем такое нужно?
HDR?

_________________
Звиздеть не мешки ворочать


Top
   
 Post subject: Re: libimg
PostPosted: Thu Nov 19, 2020 7:01 pm 
Offline
Mentor
User avatar

Joined: Mon Oct 19, 2009 10:58 am
Posts: 599
For image processing and for hardware that supports more than 8 bits per channel.

For example,
Philips 203V5LSB26 supports "16.7M" colors. Which is 2^(8*3) = 16,777,216, i.e. 3 color channels, 8bpp each.
Philips 329P9H supports "1.07 billion" colors. Which is 2^(10*3) = 1,073,741,824, i.e. 3 color channels, 10bpp each.

KolibriOS doesn't support such color modes.


Top
   
 Post subject: Re: libimg
PostPosted: Thu Nov 19, 2020 11:15 pm 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 5383
dunkaist wrote:
For image processing and for hardware that supports more than 8 bits per channel.

For example,
Philips 203V5LSB26 supports "16.7M" colors. Which is 2^(8*3) = 16,777,216, i.e. 3 color channels, 8bpp each.
Philips 329P9H supports "1.07 billion" colors. Which is 2^(10*3) = 1,073,741,824, i.e. 3 color channels, 10bpp each.

KolibriOS doesn't support such color modes.
Wow, thanks for the article, now its clear.

_________________
Звиздеть не мешки ворочать


Top
   
 Post subject: Re: libimg
PostPosted: Tue Dec 08, 2020 9:25 pm 
Offline
Mentor
User avatar

Joined: Mon Oct 19, 2009 10:58 am
Posts: 599
There has been alpha blending code in libimg for quite a long time, I wrapped it into img.blend function and exported in #8341.

I also committed an example in #8342.
BTW, the example uses img.from_file function, which helps to avoid calling file.open, file.read and file.close from libio.


Top
   
 Post subject: Re: libimg
PostPosted: Tue Dec 08, 2020 9:44 pm 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 5383
dunkaist wrote:
There has been alpha blending code in libimg for quite a long time, I wrapped it into img.blend function and exported in #8341.

I also committed an example in #8342.
BTW, the example uses img.from_file function, which helps to avoid calling file.open, file.read and file.close from libio.

dunkaist, thanks a lot! I will try to implement it after fix all issues of image support in WebView.

BTW, what about adding such blend into KIV for PNG and ICONS?

_________________
Звиздеть не мешки ворочать


Top
   
 Post subject: Re: libimg
PostPosted: Tue Dec 08, 2020 10:03 pm 
Offline
Mentor
User avatar

Joined: Mon Oct 19, 2009 10:58 am
Posts: 599
Leency wrote:
BTW, what about adding such blend into KIV for PNG and ICONS?
It is to be done one day.


Top
   
 Post subject: Re: libimg
PostPosted: Fri Dec 11, 2020 6:06 am 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 5383
#8363 libimg: img.decode now checks that _length is not null (fix crash)

_________________
Звиздеть не мешки ворочать


Top
   
 Post subject: Re: libimg
PostPosted: Sat Dec 12, 2020 11:13 pm 
Offline
User avatar

Joined: Mon Oct 27, 2008 10:10 pm
Posts: 890
После ревизии 8341 перестала компилироваться libimg через файл build.bat
After revision 8341 libimg stopped compiling through the build.bat file

Leency wrote:
#8363 libimg: img.decode now checks that _length is not null (fix crash)

Думаю так будет оптимальнее, хотя пока не проверял работоспособность по причине указанной выше
Spoiler: Show
Code:
proc img.decode _data, _length, _options ;////////////////////////////////////////////////////////;;
;;------------------------------------------------------------------------------------------------;;
;? decodes loaded into memory graphic file                                                        ;;
;;------------------------------------------------------------------------------------------------;;
;> [_data]    = pointer to file in memory                                                         ;;
;> [_length]  = size in bytes of memory area pointed to by [_data]                                ;;
;> [_options] = 0 / pointer to the structure of additional options                                ;;
;;------------------------------------------------------------------------------------------------;;
;< eax = 0 / pointer to image                                                                     ;;
;;================================================================================================;;
    mov eax, [_length]
    or  eax,eax
    jz  .fail
    push    ebx
    mov ebx, img.formats_table
    @@: stdcall [ebx + FormatsTableEntry.Is], [_data], [_length]
    or  eax, eax
    jnz @f
    add ebx, sizeof.FormatsTableEntry
    cmp dword[ebx], eax ;0
    jnz @b
    pop ebx
  .fail:
    ret
    @@: mov eax, [ebx + FormatsTableEntry.Decode]
    pop ebx
    leave
    jmp eax
endp


Top
   
 Post subject: Re: libimg
PostPosted: Sun Dec 13, 2020 3:48 am 
Offline
Designer
User avatar

Joined: Thu Jan 25, 2007 3:33 pm
Posts: 5383
dunkaist wrote:
BTW, the example uses img.from_file function, which helps to avoid calling file.open, file.read and file.close from libio.
Thanks for a hint with img.from_file. It helped me to decrease the C-- app sizes in #8381, in general we got 2 additional IMG sectors free.

#8383 also brings 3 IMG sectors more.

_________________
Звиздеть не мешки ворочать


Top
   
 Post subject: Re: libimg
PostPosted: Sun Dec 13, 2020 9:58 am 
Offline
Mentor
User avatar

Joined: Mon Oct 19, 2009 10:58 am
Posts: 599
IgorA wrote:
После ревизии 8341 перестала компилироваться libimg через файл build.bat
After revision 8341 libimg stopped compiling through the build.bat file

I don't understand why people keep using *.bat and make files to build KolibriOS. There is build.txt in the root of the repository that explains how to build with tup. You don't need Windows-specific bat files or GNU-specific makefiles. Just use tup. Tup files are used on the autobuild server and therefore are always up-to-date. Custom bat files and makefiles are to be avoided if tup autobuild is set up.


Top
   
 Post subject: Re: libimg
PostPosted: Mon Dec 21, 2020 5:20 pm 
Offline
User avatar

Joined: Mon Oct 27, 2008 10:10 pm
Posts: 890
rev 8463
Сделано сохранение 32 битных изображений в png. (В файле libimg.asm пробелы заменились на табуляции, но это вышло случайно :? тут виноват редактор FASMW)

Сохранение делается почти так-же как и с 24 битами, но вместо изображения
Code:
stdcall [img_create], [buf_png.w], [buf_png.h], Image.bpp24
...

создается изображение:
Code:
stdcall [img_create], [buf_png.w], [buf_png.h], Image.bpp32
...


Made saving of 32 bit images in png. (In the libimg.asm file, spaces were replaced with tabs, but this came out by accident :? Tutat FASMW editor)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 96 posts ]  Go to page Previous 13 4 5 6 7 Next

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited