XNView

discuss PC<>Acorn file transfer issues & the use of FDC, XFER, Omniflop/disk etc.
Post Reply
User avatar
BeebMaster
Posts: 2632
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

XNView

Post by BeebMaster » Mon Oct 23, 2017 8:20 pm

I just downloaded XNView on Ubuntu, although I understand that there may also be a version for another current operating system that a few people are using.

I installed it because I wanted to be able to view Acorn Sprite files (ie. from !Paint or *SCREENSAVE etc) on PC without having to convert them on the Acorn machine first.

It lists Acorn Sprite format as one of its 500 supported filetypes.

Doesn't work though, preview of sprites just shows as a grey-and-white check.

Anyone had experience of using Sprite files in XNView? Or anything else even?
Image

paulb
Posts: 811
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: XNView

Post by paulb » Mon Oct 23, 2017 9:14 pm

BeebMaster wrote:Anyone had experience of using Sprite files in XNView? Or anything else even?
I've used davidb's spritefile module which did even provide a GIMP plugin after some messing around I once did, but I'm not sure that the plugin still works. Still, the command line tools probably keep doing the business.

User avatar
richardtoohey
Posts: 3590
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: XNView

Post by richardtoohey » Mon Oct 23, 2017 10:00 pm

@BeebMaster - can you post a sample file?

User avatar
BeebMaster
Posts: 2632
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

Re: XNView

Post by BeebMaster » Tue Oct 24, 2017 11:25 pm

Here we are - one is a screenshot I made with !Snapper, another is a !Paint daub.
Attachments
Sprites.zip
(40.7 KiB) Downloaded 26 times
Image

User avatar
richardtoohey
Posts: 3590
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: XNView

Post by richardtoohey » Tue Oct 24, 2017 11:53 pm

Thanks; I did Google for some sample files but wasn't sure what I was looking at ... so would end up barking up the wrong tree!

Will have a play and see if I can find anything useful ...

User avatar
richardtoohey
Posts: 3590
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: XNView

Post by richardtoohey » Wed Oct 25, 2017 7:36 am

Urgh ... my plan was to have a look at XNView, check out the source and see what was going on.

But it's closed source ... and I had a mission even getting it to run on Ubuntu (tried 17.04 then 17.10) and got lost in a world of misery (the software center saying it was/wasn't/was installed, saying I needed to register for something, saying the install had failed, but installing something, learning about Ubuntu snaps, etc.) I did get it running but it wouldn't even open the file (tried renaming to .acorn etc.)

davidb/paulb's code might be a better starting point than this XNView stuff. :?:

User avatar
davidb
Posts: 2253
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: XNView

Post by davidb » Wed Oct 25, 2017 3:06 pm

I used spr2img from the Spritefile package to convert the two sprites. I hope they are represented correctly. Use

Code: Select all

python setup.py build
and

Code: Select all

sudo python setup.py install
to build and install the modules and spr2img tool on your system.
Attachments
newsprite.png
screendump.png

User avatar
BeebMaster
Posts: 2632
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

Re: XNView

Post by BeebMaster » Sat Oct 28, 2017 9:41 am

I had no problem installing XNView, just downloaded the deb, double-clicked it and pressed install.

Spritefile sounds promising, I downloaded python imaging library, built, installed, downloaded spritefile, built, installed BUT

Code: Select all

spr2img.py Screen0.acorn convert.png
Traceback (most recent call last):
  File "/usr/local/bin/spr2img.py", line 27, in <module>
    import cmdsyntax, Image, os, spritefile, sys
ImportError: No module named cmdsyntax
Image

paulb
Posts: 811
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: XNView

Post by paulb » Sat Oct 28, 2017 12:20 pm

BeebMaster wrote:I had no problem installing XNView, just downloaded the deb, double-clicked it and pressed install.

Spritefile sounds promising, I downloaded python imaging library, built, installed, downloaded spritefile, built, installed BUT

Code: Select all

spr2img.py Screen0.acorn convert.png
Traceback (most recent call last):
  File "/usr/local/bin/spr2img.py", line 27, in <module>
    import cmdsyntax, Image, os, spritefile, sys
ImportError: No module named cmdsyntax
The cmdsyntax module is available here. I'm not sure Dave has a newer page for it, or whether it also resides in an online repository.

User avatar
davidb
Posts: 2253
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: XNView

Post by davidb » Sat Oct 28, 2017 12:36 pm

paulb wrote:The cmdsyntax module is available here. I'm not sure Dave has a newer page for it, or whether it also resides in an online repository.
No, I never bothered to put the repository anywhere public. I suppose I could do that.

Alternatively, or maybe additionally, I could remove the cmdsyntax code from the spr2img tool since it doesn't really need any of the features it provides. I think I'll do that, anyway.

User avatar
BeebMaster
Posts: 2632
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

Re: XNView

Post by BeebMaster » Sat Oct 28, 2017 2:04 pm

Oh right, I didn't clock that I had a bit missing. Installed that now. Next problem:

Code: Select all

spr2img.py Screen0.acorn convert.png
Failed to open file for sprite: convert.png/screendump.png
Image

User avatar
davidb
Posts: 2253
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: XNView

Post by davidb » Sat Oct 28, 2017 2:34 pm

Strange. Do you already have a file or directory called convert.png? It should complain if there's already something there called that.

Also, note that it creates a directory with the name you give it as the second argument. Spritefiles can contain multiple sprites, you see.

User avatar
BeebMaster
Posts: 2632
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

Re: XNView

Post by BeebMaster » Sun Oct 29, 2017 12:47 pm

No, that object didn't exist previously but it creates the directory during the run as you say. Then there is a 33 byte file inside with the name of the first sprite. So it can get as far as creating and writing to that file but then something must go wrong.

Not sure what to do next, I did copy & paste the whole terminal output during all the various bits of installation I was doing yesterday, I could post that if it might shed any light.
Image

User avatar
davidb
Posts: 2253
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: XNView

Post by davidb » Sun Oct 29, 2017 1:24 pm

Feel free to send it to me in a PM.

Post Reply