-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support and recognition for "X BitMap" images #4133
Conversation
XBM ("X BitMap") files are an early precursor to XPM ("X PixMap") files, which are currently supported on GitHub (albeit with a misleading name).
Didn't we discuss copyleft licenses not being an issue for sample files not so long ago? (I can't find the issue/PR again :-/) |
codemirror_mode: clike | ||
codemirror_mime_type: text/x-csrc | ||
language_id: 782911107 | ||
X PixMap: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaaah, man. This is a PITA for me. I need to relearn Rails migrations if we do this. If I don't put in a migration, we end up with the same problems we had with the Pelr6 -> Perl 6 change and the DB and search gods frown upon me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, erh, should we then start thoroughly reviewing the hell out of every single grammar-name to make any other potential future change happen in one migration? 😅
I didn't want to rename the entry, as I am conscious of how much of a pain it is database-wise. 😞 Unfortunately, I can't change fact. :( That's a fact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the KiCad incident last year proved anything, it's that inaccuracies in language.yml
are better dealt with much sooner than a hell of a lot later. 😥
W3C is fine. I don't see a copy of it in this PR though. |
Oh. No, I didn't include a copy as I was asking about licenses for sample files.
So I'm guessing @pchaigno is right? |
@Alhadis if we're relying on a license to distribute sample material from this repo, we need to comply with the license we're relying on. The W3C license requires keeping a copy of the license. I recall this coming up before regarding samples: #3650 (comment) |
Converted from a 32×32-sized icon of an SVG version of the Public Domain symbol, which was sourced from Wikipedia.
Actually, never mind. I converted one myself (using a 32×32-sized 2-colour version of the Public Domain symbol): Generated via λ ffmpeg -i .gif image.xbm
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.1.0 (clang-902.0.39.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, gif, from 'Cc-public_domain_mark_white.gif':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: gif, bgra, 32x32, 10 tbr, 100 tbn, 100 tbc
Stream mapping:
Stream #0:0 -> #0:0 (gif (native) -> xbm (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7ff0df817400] full chroma interpolation for destination format 'monow' not yet implemented
Output #0, image2, to 'o.xbm':
Metadata:
encoder : Lavf58.12.100
Stream #0:0: Video: xbm, monow, 32x32, q=2-31, 200 kb/s, 10 fps, 10 tbn, 10 tbc
Metadata:
encoder : Lavc58.18.100 xbm
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.10 bitrate=N/A speed= 67x
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown |
@Alhadis 🆒. Side note: slightly better, or additional, link in your comment above would be to https://commons.wikimedia.org/wiki/File:Cc-public_domain_mark_white.svg (the page about the file, which on Wikimedia Commons always includes copyright/license/public domain info). It isn't a given that an image about the public domain will itself be public domain 😬 though thankfully this one is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we’ve got code in place to easily make the name changes within the database, so I’m happy to merge this now. 🙇♂️ @Alhadis
This PR introduces support for a text-based bitmap image format called X BitMap. (Not to be confused with the currently-supported and superficially similar format, X PixMap.
Description
This PR also adjusts XPM's
languages.yml
entry so it's technically correct and uses its longer, human-readable name (since that's how those images get referred to everywhere else).Both formats use C syntax, so I've lumped them under the
C
group whilst leaving their language-types todata
(since that's ultimately what they are).In-the-wild usage
~364,280 results for
xbm
files, none of them shared with a recognised language. From what I've gone through, they're all XBM data.Sample files
Update:
Replaced the sample images with a manually-converted one that's free from licensing complications.
Both of thexbm
samples I've added were hocked fromw3c/libwww
:image.xbm
doc.xbm
Licensing-wise, they're released under the W3C Software Notice and License, which is new to me. Wikipedia's page for the W3C's license states that it's acceptably permissive and non-copyleft, though it mentions GPIL compatibility.The full license text can be found here. Should we summon the wisdom of our venerable LawGuruGuy™, @mlinksva? Even though this license looks okay, I dare not tread the swampy waters of "Legal-Looking Stuff That Will Actually Get You Life-Jailed If You Read It Wrong". Hereafter known asLLSTWAGYLJIYRIW
, my new favourite Perl motto.