Can OXT import XWD images?

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Can OXT import XWD images?

Post by richmond62 »

https://www.fileformat.info/format/xwd/egff.htm

Unless 'Kev' and co. bothered to remove some old code (and looking at things they never did: they either 'buried' it, or worked round it), as XWD format could be handled by MetaCard, OXT should, at least potentially, be capable of importing XWD images (and working as an image converter).
there's nothing in someone else's 20 year old proprietary software that isn't in OXT
Erm: MetaCard is NOT 20 years old, and I belive it was 'Open Sourced' in some respects quite some time ago.
https://richmondmathewson.owlstown.net/
FourthWorld
Posts: 280
Joined: Sat Sep 11, 2021 4:37 pm
Contact:

Re: Can OXT import XWD images?

Post by FourthWorld »

richmond62 wrote: Sat Mar 23, 2024 3:41 pm Erm: MetaCard is NOT 20 years old, and I belive it was 'Open Sourced' in some respects quite some time ago.
I was the first of three project managers for the MC IDE open source project, followed by Ken Ray and then Klaus Major, before we ultimately stopped using it. A newcomer who went by the name Bogs maintained a fork for a while, but I haven't seen Bogs or the fork in many years.

Only the IDE stacks were open-sourced, under MIT license, at the time the engine was acquired by RunRev Ltd/LC Ltd in 2003.

Nothing in Dr Raney's MC engine was released as open source until LC's FOSS edition in 2013.

As for XWD, it predates PNG and is specific to the XWindows display manager. With PNG's superior feature set and the decline of XWindows in favor of Wayland, I'm not aware of any modern graphics tools that feature XWD, if they support it at all.
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Can OXT import XWD images?

Post by richmond62 »

Presumably these services exist because there is some sort of demand for them:

https://www.vertopal.com/en/convert/xwd

https://imagetostl.com/convert/file/xwd/to/png

https://sharkfoto.com/converter/xwd-to-mac/

and that is only 3 online offerings.

GraphicConverter also processes them:

https://www.lemkesoft.de/en/products/gr ... t-formats/
https://richmondmathewson.owlstown.net/
FourthWorld
Posts: 280
Joined: Sat Sep 11, 2021 4:37 pm
Contact:

Re: Can OXT import XWD images?

Post by FourthWorld »

"some sort of demand" is any number greater than zero since the tool was first released.

Let's explore a more specific and relevant quantification:

What is the number of times you were unable to do something you needed to do because support that format was not available in OXT?
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Can OXT import XWD images?

Post by richmond62 »

Well, let's start with sound export.

Then AVIF.

HEIC.

WebP.

Decent, consistent, cross-platform movie presentation.

Movie export.

Will those do?
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Can OXT import XWD images?

Post by tperry2x »

The answer to your question is "yes" and "no" it would seem.

You can't import it, but you can set the image source of an image object to the xwd image. However, results are as follows:
xwd image.jpg
xwd image.jpg (509.19 KiB) Viewed 345 times
Plus, in this example, the jpg was 260kb - the xwd image was 5.8MB, so don't know why you'd necessarily choose that format.
I know that HEIC is only available on recent MacOS, and the codec may not be available for older versions of MacOS or Windows. Linux - no as any video format that plays reliably would be a bonus for OXT.

AVIF, I'll test now...

WebP (should do, I'll test now...)
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Can OXT import XWD images?

Post by tperry2x »

At least as far I can test here, no luck in reading avif and webp:
no-joy-with-avif.png
no-joy-with-avif.png (278.61 KiB) Viewed 344 times
no-joy-with-webp.png
no-joy-with-webp.png (279.95 KiB) Viewed 344 times
But I always convert to JPEG if quality isn't important, or PNG if it is.
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Can OXT import XWD images?

Post by richmond62 »

I wasn't being particularly serious re WebP, AVIF, or HEIC, as those formats are really neither here nor there as far as OXT is concerned, and as you point out, there are plenty of things "out there" to convert them to the PNG or JPG format.

My main 'thrust' was to take aim at a statement that I feel is rather crass:
there's nothing in someone else's 20 year old proprietary software that isn't in OXT
and then:
What is the number of times you were unable to do something you needed to do because support that format was not available in OXT?
But that person seems to rejoice in picking holes in things I write here.

They might like to contribute to the development of OXT rather than that; oh, and their 'copyright fixation', and that very odd idea that one can patent functionality: one can, possibly, patent an instrument for doing something; but one cannot patent doing something: and, re software, there must be at least 10 programs "out there" to do each "something".

I, for one, am not a fool, and am fully aware what copyright is: and I think the USA definition of copyright as 70 years + however many eons after the author is dead is ludicrous. And while the lifetime of an author does make sense for books, it makes little or none with regard to software: after all, recently I was contacted by a chap who was at school with me and now, with his wife, runs a damn-nearly-free school in Botswana running about 25 32-bit INTEL iMacs running MacOS 10.6.8 who was refused for a grant by the USIS because the software running on those machines was derived from the Macintosh Garden, so 'pinched'.

Oh, and by the way, what on earth is "custard-pud", when that is so obviously creme-caramel or creme-brulee? 8-)

At its best, creme-caramel is fantastic!
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Can OXT import XWD images?

Post by tperry2x »

That's a japanese take on a custard pud, with Kasutera sponge - which is why it looks a little different.
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Can OXT import XWD images?

Post by richmond62 »

Ah, "how wise one might become making enquiries at the Bellingham show."

https://youtu.be/eDjLKQhUEYM

Really has to be listened right through. 8-)
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Can OXT import XWD images?

Post by tperry2x »

I once had someone bump into me and apologised profusely. When I looked, they'd nicked an old flip-phone out of my pocket.

I was taking it to a charity shop anyway, as it worked and I was upgrading. But that wasn't the point.

I vowed I'd have as little as possible to do with mixing with real people, right then and there.

So I can understand how "he'll never go back to the Bellingham show".

Sometimes you try your best to help. One minute you think everything is going well and having fun, but it only takes someone to come along and ruin it totally forever more. So I'm learning best to keep out of sharing an opinion or saying anything.

Until proven otherwise, most people aren't worth bothering with.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Can OXT import XWD images?

Post by OpenXTalkPaul »

It's an uncompressed format so no decoding to worry about, the file format doesn't look too difficult to parse, but really why bother writing a parser/converter when there's plenty of tools to convert it to a more commonly used format?
I've dealt with all sorts of graphic file formats over the decades and never once encountered .XWD (X-WIndow Dump). I'm going to assume it came from some old X11 screen shot tool.

WebP, now there's a format that seems to be getting more common. I vaguely remember someone scripting something to do with that. I'm pretty sure the browser widget should be able to render WebP format.

It be great to be able to import layers of a .PSD (Photoshop's) file format. I could probably get that working via CoreImage in that 'Apple Imaging Library' I was working on for a bit.

I'd be happy if I could at least play a .mp3 in the background without getting horrible noises instead. ( on macOS using my NSSound wrapper library works great).

And of course MIDI files (but I sort of have that covered).

Formats OXT can export to is rather lacking, IMO.

I want to point out that Wayland does have 'Xwayland', an X-Windows compatibility layer, but I'm not sure if that supports stuff from X11 going back to the 1980s. It doesn't even seem to be fully X compatible in certain circumstances (that affect our xTalk Engine here).
User avatar
richmond62
Posts: 2764
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Can OXT import XWD images?

Post by richmond62 »

GIMP can import PSD layers, and GIMP is open source.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Can OXT import XWD images?

Post by tperry2x »

OpenXTalkPaul wrote: Fri Apr 12, 2024 8:26 pm I'd be happy if I could at least play a .mp3 in the background without getting horrible noises instead. ( on macOS using my NSSound wrapper library works great).
Do they not work? They work on MacOS 10.9 to 10.15 as far as I can tell.
(just have to drag the audio position slider around sometimes).
mp3-test.png
mp3-test.png (44.87 KiB) Viewed 164 times
Sample stack here
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Can OXT import XWD images?

Post by OpenXTalkPaul »

tperry2x wrote: Sun Apr 14, 2024 2:59 pm
OpenXTalkPaul wrote: Fri Apr 12, 2024 8:26 pm I'd be happy if I could at least play a .mp3 in the background without getting horrible noises instead. ( on macOS using my NSSound wrapper library works great).
Do they not work? They work on MacOS 10.9 to 10.15 as far as I can tell.
(just have to drag the audio position slider around sometimes).

mp3-test.png
Sample stack here
I'll have to check again, but yeah on BigSur I've gotten some horrible noise when trying to play an .mp3 using the 'play file' command, it works fine with the a 'player control' though, which I know uses newer AVMedia APIs, it's only the 'play file' command that does this. If anyone could confirm that this is a bug on macOS 11+, that would be great thanks.
I have macOS extension for NSSound that performs same functionality on macOS and plays .mp3s as fine as expected. I also have a working AVSoundRecorder extension as replacement for deprecated Quicktime-based sound recording.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Can OXT import XWD images?

Post by OpenXTalkPaul »

richmond62 wrote: Sat Apr 13, 2024 5:22 am GIMP can import PSD layers, and GIMP is open source.
Yes, but we don't have a wrapper library written for whatever library GIMP uses to perform that functionality. While I do already have one (that is open source, by me) that uses Apple's CoreImage...which is a private API but we can make use of it (and in case this as what you were thinking, that's not a GPL deal breaker since CoreImage API is an integrated part of the Operation System and we aren't including it, only a wrapper for it).

ImageMagick and other open source software / libraries can probably do .PSD as well. The PSD file format/structure is well known. https://www.adobe.com/devnet-apps/photo ... 7409_72092
User avatar
tperry2x
Posts: 1531
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Can OXT import XWD images?

Post by tperry2x »

OpenXTalkPaul wrote: Mon Apr 15, 2024 10:16 pm I'll have to check again, but yeah on BigSur I've gotten some horrible noise when trying to play an .mp3 using the 'play file' command, it works fine with the a 'player control' though, which I know uses newer AVMedia APIs, it's only the 'play file' command that does this. If anyone could confirm that this is a bug on macOS 11+, that would be great thanks.
I have macOS extension for NSSound that performs same functionality on macOS and plays .mp3s as fine as expected. I also have a working AVSoundRecorder extension as replacement for deprecated Quicktime-based sound recording.
This is the kind of situation I am in with anything that uses the player command in Linux.
I'm experimenting using the VLC back-end (CLI) because it can play anything I've thrown at it so far. Plus it's capable of returning callbacks, and is non-blocking.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Can OXT import XWD images?

Post by OpenXTalkPaul »

tperry2x wrote: Mon Apr 15, 2024 10:30 pm
OpenXTalkPaul wrote: Mon Apr 15, 2024 10:16 pm I'll have to check again, but yeah on BigSur I've gotten some horrible noise when trying to play an .mp3 using the 'play file' command, it works fine with the a 'player control' though, which I know uses newer AVMedia APIs, it's only the 'play file' command that does this. If anyone could confirm that this is a bug on macOS 11+, that would be great thanks.
I have macOS extension for NSSound that performs same functionality on macOS and plays .mp3s as fine as expected. I also have a working AVSoundRecorder extension as replacement for deprecated Quicktime-based sound recording.
This is the kind of situation I am in with anything that uses the player command in Linux.
I'm experimenting using the VLC back-end (CLI) because it can play anything I've thrown at it so far. Plus it's capable of returning callbacks, and is non-blocking.
I've done some similar tests to use MPLAYER, FFMPEG/FFLAY, VLC, MPV
I like FFMPEG tools. That can record and convert various media, act as a media server and other neat tricks. It uses some of the same libraries that are used by VLC. Of course those libraries can be rather large in size depending on what options are compiled in, so I'm not sure we'd want to include them even if someone were to wrap it in exertions builder.

I lean towards a library that checks to see what's available in the OS installed packages and then using some preferred order to select the best one to use for playback or recording. So for exampe a 'record' command might use MCI strings on Windows, AVMedia API on macOS, and FFMPEG on Linux, the script author would call the same handler and the library would sort out which to use.

The thing about Linux is there's just so many options for certain things like media player APIs and no real guarantee any one particular option will be available. That's where proprietary OS APIs like Apples AVMedia have the advantage of being sure the API will be present in the OS.

BTW, I've done some experiments getting some things to be non-blocking using customized shell/open process commands, wrapped the shell scripts in parens () which can make some otherwise blocking things run as non-blocking sub processes... without any sort of callbacks of course, I do loop checking to if the processID is still in the running processIDs list, a Process ProcessID is '0' if it's completed its run. I was testing the ID with curl commands but that should theoretically work with lots of command line tools.
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests