• Re: Sixel Gallery - Viewa

    From paulie420@VERT/BEERS20 to Codefenix on Wed Feb 8 20:48:00 2023
    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.........ã
  • From Codefenix@VERT/CONCHAOS to paulie420 on Thu Feb 9 09:12:32 2023
    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 ]=-ã
  • From paulie420@VERT/BEERS20 to Codefenix on Thu Feb 9 18:59:00 2023
    [All great info in your reply. Appreciate all the points you posted; thanks!!]ãã Co> The other consideration is text quality/legibility. By converting PDFã Co> text to an image, the text won't look as sharp. By further converting itã Co> to sixel, it could look worse, especially if ImageMagick is scaling downã Co> the sixel for viewing in a typical 80x24 SyncTERM window. Maybe thisã Co> isn't an issue if your source PDF is primarily image-based. But if it'sã Co> text-based (but not a scanned image of text), you might consider using aã Co> tool like Poppler's pdftotext to extract the text from the PDF andã Co> display that as an alternative.ããI get a similar issue w/ the PDF not being quality enough to make a [good enough] conversion to text - so your point probably applies even more; if I can't get good TEXT out of it the SIXEL conversion would probably suffer as well.ãããã|07p|15AULIE|1142|07oã|08.........ã