Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 14 Dec 2017, 00:46
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Chimera-1.70p1 - old browser reborn...
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [28 Posts]   Goto page: Previous 1, 2
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 900

PostPosted: Tue 04 Jul 2017, 11:22    Post subject:  

Use of stb_image for build in image handling now working - so bmp, png, jpg, tga a.o image formats no more need external loaders. Uploaded new build script and patches - and a fresh pet-package - in first post.
Missing support for tif and svg but there might be solutions for that too.
Static linked bin using uclibc and tinyxlib (+upx) is now 290K...
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4764
Location: Kingwood, TX

PostPosted: Wed 19 Jul 2017, 02:28    Post subject:  

goingnuts wrote:
Missing support for tif and svg but there might be solutions for that too.
My image viewer that you patched uses nanosvg which is quite small and uses the same output format as stb_image... does anyone come across tiff files in web pages anyhow? I'd probably add webp before tiff.

Edit:
There is another example patch to use them for an older version of jwm at https://gist.github.com/technosaurus/76942ee935bdcc81d1fb

_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 900

PostPosted: Wed 19 Jul 2017, 13:59    Post subject:  

Unfortunatly chimera postproces the image delivered by stb_image so quality decrease. Tried a lot of different ways to modify the source to avoid this - but with no luck. Would be cool to let stb_image handle all images and stripout all original image code. Eventually use it as a cheap image browser as well.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4764
Location: Kingwood, TX

PostPosted: Mon 07 Aug 2017, 18:55    Post subject:  

I'd have to look at the code, but i assume it has to do with resizing (there is another stb_* header for image resizing)... I'm currently moving, so will be posting from my phone till September, but if someone puts it on GitHub, I can take a look though.

IIRC, netsurf-framebuffer isn't much bigger statically compiled with xcb... most of the size is openSSL, but that could be eleminated by using curl equivalents and using a lighter SSL backend.

_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 900

PostPosted: Thu 31 Aug 2017, 13:39    Post subject:  

Resizing seems not the problem (chimera does not resize images) but more likely function "reduce" from xloadimage - reduces colors to max 256.
The external conversion from img->jpg and then from jpg->gif (via img2jpg and djpeg) gives no problems with image quality (but slow down browsing...).
So worked further with img2jpg and reduced bin size more by using tiny_jpeg.h to replace libjpeg (for writing jpg). Source attached.

If external image-conversion should be optimized further (in respect to chimera users) - a direct conversion from img2gif would be nice, but I found no simple gif-writer.

Also attached screen shot of chimera using internal stb_image (left image) and chimera using external img2jpg/djpeg (right image) - showing the decrease in image quality.
snap0005.png
 Description   
 Filesize   197.3 KB
 Viewed   227 Time(s)

snap0005.png

img2jpg-0.2.tar.gz
Description 
gz

 Download 
Filename  img2jpg-0.2.tar.gz 
Filesize  211.45 KB 
Downloaded  17 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
greengeek


Joined: 20 Jul 2010
Posts: 4741
Location: Republic of Novo Zelande

PostPosted: Fri 03 Nov 2017, 23:08    Post subject:  

goingnuts wrote:
Resizing seems not the problem (chimera does not resize images) but more likely function "reduce" from xloadimage - reduces colors to max 256.
I was hoping to use xloadimage to quickly display jpg images from cli but it appears missing from my Slacko 5.6 derivative. Is it something you would expect to be in most Puppies? I tried various spellings and capitalisations but no joy.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 900

PostPosted: Sun 05 Nov 2017, 09:48    Post subject:  

You can find xloadimage-4.1 source here. The above referenced xloadimage is part of chimera-source.
You might want to try my xvl-0.1 from my xwoaf-rebuild-project - binary attached. It supports jpg, png, gif and bmp on various screen depths.
xvl.gz
Description  fake.gz-extention
gz

 Download 
Filename  xvl.gz 
Filesize  88.62 KB 
Downloaded  21 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
greengeek


Joined: 20 Jul 2010
Posts: 4741
Location: Republic of Novo Zelande

PostPosted: Sun 05 Nov 2017, 14:51    Post subject:  

Thanks goingnuts. I have just tried your xvl but I must be getting the wrong syntax:
Code:
# xvl -v /root/test.jpg
PNG/BMP/JPG/GIF to JPEG image converter
PNG/BMP/JPG/GIF to JPEG image viewer
Usage: img2jpg [-v] [-s] [-i input.png] [-o output.jpg]
       -i input.png  : input IMAGE file
       -o output.jpg : output JPEG file (default input.jpg)
       -s stdout     : output JPEG file to stdout
       -v viewer     : view image


I am looking for the lightest possible jpg viewer so I can produce a slideshow of jpg imges that come from my "security webcam" script. I am seeking to display sequential images at a rate that makes them look like a movie in fast forward so the user can review the webcam activity in a short timeframe. thread here

Can you suggest an appropriate syntax for me to view /root/test.jpg with xvl please?

cheers!
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 900

PostPosted: Sun 05 Nov 2017, 16:05    Post subject:  

This should do:
Code:
./xvl -v -i /root/test.jpg
. Hope it works for you.
I realise that the name in the help should be changed to xvl.
Back to top
View user's profile Send private message Visit poster's website 
greengeek


Joined: 20 Jul 2010
Posts: 4741
Location: Republic of Novo Zelande

PostPosted: Mon 06 Nov 2017, 00:58    Post subject:  

Great. Many thanks - that works. One of the options I should have tried Smile
cheers!
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4741
Location: Republic of Novo Zelande

PostPosted: Mon 06 Nov 2017, 01:06    Post subject:  

I don't know if this is the right place for this question, but can anyone suggest the most lightweight method for displaying a jpg image? (i don't need to display other formats - just jpg).
Thanks!
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4741
Location: Republic of Novo Zelande

PostPosted: Mon 06 Nov 2017, 03:34    Post subject:  

Tried compiling xloadimage but got the following errors:
Code:
loadimage\" rlelib.c
In file included from rlelib.c:15:0:
/usr/lib/gcc/i486-slackware-linux/4.7.1/include/varargs.h:4:2: error: #error "GCC no longer implements <varargs.h>."
/usr/lib/gcc/i486-slackware-linux/4.7.1/include/varargs.h:5:2: error: #error "Revise your code to use <stdarg.h>."
make[1]: *** [rlelib.o] Error 1
make[1]: Leaving directory `/root/Downloads/xloadimage.4.1'
make: *** [default] Error 2
#


Sorry - I'm not very good at this stuff. Any tips appreciated,
cheers
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2632

PostPosted: Mon 06 Nov 2017, 05:09    Post subject:  

fedora is bound to have patches that should be applied to that before compiling.
Here's the src.rpm which contains all the build-time stuff:
https://kojipkgs.fedoraproject.org//packages/xloadimage/4.1/23.fc27/src/xloadimage-4.1-23.fc27.src.rpm

Yeah, 27 patches in there. 19 of them are *.dpatch files, so they come originally from debian or ubuntu, so you might want to check current debian sources for any other recent patches to it. With both, you may want to avoid some patches which add features you don't want.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [28 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0495s ][ Queries: 14 (0.0087s) ][ GZIP on ]