![]() |
#1 |
Rookie
Join Date: May 2014
Posts: 9
![]() |
![]()
Hi, I recently took a screenshot with Angband. The file was saved in PNG format. Now I would like to upload it in the screenshots section but first I have to convert it to HTML code because PNG isn't allowed. How do I do that? Thanks for your help!
|
![]() |
![]() |
![]() |
#2 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 57
Posts: 9,481
Donated: $60
![]() ![]() |
Sorry, but you need to take the screenshot in game, using the ')' command. That will save an html screenshot in your user directory.
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
#3 |
Rookie
Join Date: May 2014
Posts: 9
![]() |
Too bad. I found this webpage here where PNGs can be converted to base64 strings. Works great with IE 11 for example. But the upload script does not accept the generated string unfortunately.
![]() |
![]() |
![]() |
![]() |
#4 | |
Knight
Join Date: Jan 2008
Posts: 526
![]() |
Quote:
A PNG can be viewed in two different ways: 1) To the computer, it is a long string of binary data. (You can open it in a hex editor to see this view.) 2) When displayed to the user, it contains meaningful visual information, such as in this case showing the layout of a dungeon. It's very easy to manipulate the PNG in terms of 1). What you've found is a program that takes the binary representation of the PNG (the data that it is written as on a hard drive) and transforms it into the base64 equivalent - which is the exact same data, just in a form that can be sent over a text-only means of communication, such as an email, then un-base64'd to get the original PNG. Needless to say, the angband.oook.cz server has no idea what to do with a base64'd PNG just as much as it doesn't know what to do with a GIF, BMP or random text hammered into the submission box. What you are looking for is manipulating the PNG in terms of 2). As in, you want to represent the visual information of the PNG in another way - in terms of the symbols and colours and characters contained within it, in such a way that you could pass this information around as text. This is a difficult problem, because computers have no innate idea of what it means to parse an image - this problem is called Optical Character Recognition. http://en.wikipedia.org/wiki/Optical...er_recognition There are plenty of OCR programs out there - that are great at extracting the text from a scanned or screenshotted paper, for example - but I find it very unlikely that it would maintain the 1) colour information 2) specific monospacing that you would need, which is not something that matters for the use cases OCR is developed for. So, there is probably no easy solution for what you want.
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu |
|
![]() |
![]() |
![]() |
#5 |
Rookie
Join Date: May 2014
Posts: 9
![]() |
Okay thank you. Next time I'll use the ')' command.
By the way, why it is forbidden to upload images? If size matters the maximum image file size and dimensions could be limited. |
![]() |
![]() |
![]() |
#6 |
Prophet
Join Date: Dec 2009
Posts: 9,022
![]() |
Pav wrote the website, so it's his decision, but one reason I can think of is to avoid having random people use the screenshot section for image hosting of images unrelated to Angband.
|
![]() |
![]() |
![]() |
#7 |
Rookie
Join Date: May 2014
Posts: 9
![]() |
That sounds reasonable indeed.
|
![]() |
![]() |
![]() |
#8 |
Knight
Join Date: Jan 2008
Posts: 526
![]() |
Also, PNGs can't be read by blind people using screen reading programs, whereas HTML 'screenshots' can be. (Yes! A lot of blind or partially blind people play text and ASCII based games.)
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
cannot read file '64x64.png' | ZenDragon | Vanilla | 3 | August 27, 2013 16:18 |
Cannot open file 64x64.png | Old Coach | Development | 7 | December 7, 2012 03:23 |
I'm a convert! | Therem Harth | Vanilla | 24 | October 1, 2012 04:25 |
HTML/Web Editor | buzzkill | Idle chatter | 14 | October 22, 2011 03:26 |
2 options for Windows PNG support | Blue Baron | Development | 36 | June 1, 2011 00:14 |