Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

<Manoj> I *like* the chicken


dovenet / Synchronet Javascript / Re: Sixel Gallery - Viewa

SubjectAuthor
* Re: Sixel Gallery - Viewapaulie420
`- Re: Sixel Gallery - ViewaCodefenix

1
Re: Sixel Gallery - Viewa

<63E487FE.3802.sync-js@vert.synchro.net>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=863&group=DOVE-Net.Synchronet_Javascript#863

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: paulie420@VERT/BEERS20 (paulie420)
To: Codefenix
Subject: Re: Sixel Gallery - Viewa
Message-ID: <63E487FE.3802.sync-js@vert.synchro.net>
Date: Wed, 8 Feb 2023 13:48:00 +0000
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.20a-Linux master/fe30acd53 Feb 4 2023 GCC 12.2.0
X-FTN-CHRS: ASCII 1
WhenImported: 20230208214326-0800 41e0
WhenExported: 20230208221822-0800 41e0
ExportedFrom: VERT sync-js 3802
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
 by: paulie420 - Wed, 8 Feb 2023 13:48 UTC

Co> I tweaked my Sixel Gallery script a bit, adding an optional image path
Co> argument. If used, simply displays the specified image converted to
Co> sixel and ends. Using this small mod, I set up GIF, JPG, PNG, and BMP as
Co> Viewable File Types in SCFG. So now whenever someone browses directories
Co> containing images (e.g.: GIFs Galore CD-ROM), if they go into Extended
Co> Info for any image file and hit V to view it, they are shown a sixel
Co> preview of the image.

VERY nice, Code - I also had this 'idea' for .PDFs... one could quickly use a sixel converter to turn a PDF into a .six and display to the user. I'll come by and see yer new gallery; nice work.

|07p|15AULIE|1142|07o
|08.........

Re: Sixel Gallery - Viewa

<63E4FF50.743.dove-net2012@conchaos.synchro.net>

 copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=865&group=DOVE-Net.Synchronet_Javascript#865

 copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: paulie420
Subject: Re: Sixel Gallery - Viewa
Message-ID: <63E4FF50.743.dove-net2012@conchaos.synchro.net>
Date: Thu, 9 Feb 2023 02:12:32 -0500
X-Comment-To: paulie420
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <63E487FE.3802.sync-js@vert.synchro.net>
References: <63E487FE.3802.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.20a-Win32 master/adb05e50f Jan 28 2023 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20230209061951-0800 41e0
WhenExported: 20230209101826-0800 41e0
ExportedFrom: VERT sync-js 3804
WhenImported: 20230209091232-0500 412c
WhenExported: 20230209091947-0500 412c
ExportedFrom: CONCHAOS dove-net2012 743
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Thu, 9 Feb 2023 07:12 UTC

Re: Re: Sixel Gallery - Viewa
By: paulie420 to Codefenix on Wed Feb 08 2023 08:48 pm

Hey Paulie :)

pa> VERY nice, Code - I also had this 'idea' for .PDFs... one could quickly
pa> use a sixel converter to turn a PDF into a .six and display to the user.

PDF to image conversion is a bit of a rabbit hole, considering it's a multi-page document format and can contain mixed media (text and/or images).

At work I use GhostScript to take PDF documents and convert each page to a separate TIF image, which gets stored in our document management software. That part's easy enough, as GS has command line options for that use case.

So, in theory, you could use GS to convert your source PDF to as many images as it has pages, and then convert those resulting images to sixel with ImageMagick, and display them. These conversion steps could take some time to complete if you plan on doing them on-the-fly.

Here's where it gets hairy...

In my case I need to make my TIF output black and white, because GS' color output options usually end up generating ENORMOUS image files. It can output to PNG and JPG as well, but there's still the issue of file size. If you're only storing the image files temporarily, maybe it's not a problem, but still something to think about.

The other consideration is text quality/legibility. By converting PDF text to an image, the text won't look as sharp. By further converting it to sixel, it could look worse, especially if ImageMagick is scaling down the sixel for viewing in a typical 80x24 SyncTERM window. Maybe this isn't an issue if your source PDF is primarily image-based. But if it's text-based (but not a scanned image of text), you might consider using a tool like Poppler's pdftotext to extract the text from the PDF and display that as an alternative.

|01<|09co|03d|11e|15ƒ|11e|03n|09ix|01>|07
---
■ Synchronet ■ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor