Gnus development mailing list
 help / color / Atom feed
* [Q] Face header string to original image file
@ 2020-01-03 13:59 황병희
  2020-01-03 15:28 ` Adam Sjøgren
  0 siblings, 1 reply; 3+ messages in thread
From: 황병희 @ 2020-01-03 13:59 UTC (permalink / raw)
  To: The Gnus

In 2010, i did take picture myself. Then i lost the original
picture. Fortunately i have the Face header string.

#+BEGIN_SRC: python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

data = """\
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVMM2UIAhGJrpkJDwsD
AwgJAggKPnwFBAIEBAQJAjTkRM0eAAACN0lEQVQ4jW3Tv2sbMRQHcPnSDt78bMWctkOBgDc7
10I8Cl6DOpZm6RgPBx4LgbrjUbVVNiuXHNF/2yfJzqnEwmDfffyV9PSD2UNTfuu9A/65cT39
AnZ4j8pTcxzM/HlO4F8BnAcHCK14CuBeQXAFAJwbg/MmS2igEDWtrfZ9PyQiiJCxei1o+CNY
bUJX4J1Cr8TQlbWmFZ3vijFwT58c7kW3Z3K84oJrFAPYds8Yk6zmwnGLGai9rApZnaGgBbAZ
wF6GdoY3DiADA74IMMa5KzFPGEWDSLmAiSttDkhTqUVxAX+c/g9ER7BeVnzyZAdA5Go9Y+OC
ydXNXZlDCetJtfpWyXp6xzNQmkA+i0J+nI7jGJjKVjPfXYUKpXtc3AbQR2CraazQP17StKgr
/QpXEZrNAdIY7Wx/HmHR91U2K8XP10BLSEvS94scoPUJvN/mCVSqxiVBBdCzAbDkeG2/XlVy
BCA8ZoD4AZdUxYsiABPABNCIhsagnng4LDvL0LYYijdWCZrsRTx3YUnQGh46+0sZ2tv3MZ1A
xdKNxnuYFO9onTEClYZpHX//LNjyOiRs2ihzhO9MVnYACqo051YUZwMYhXEW1L7s2XU6LxZv
I6g4L1NTeSm7+wUBlCpD3Cyl3KXEqq5ZG+8RhEfBqsN2jrqaQYQ2PH/qRqmnh4auGgjnXPrj
j1udunqg887i/daHXTlA+Gbgm8aX9k1jvifQp2Ajm+2pRL+hk3QKGikv3dv3IdE4cwL+ATzH
tMu8OktOAAAAAElFTkSuQmCC
"""

x = data.strip()
y = x.splitlines(False)
z = "".join(y)

print(z)
#+END_SRC

Can i recover original image file from the string?

Yes, i want to recover 2010's my real face.

Sincerely, Gnus' fan Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Q] Face header string to original image file
  2020-01-03 13:59 [Q] Face header string to original image file 황병희
@ 2020-01-03 15:28 ` Adam Sjøgren
  2020-01-03 19:43   ` 황병희
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Sjøgren @ 2020-01-03 15:28 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

황병희 writes:

> iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVMM2UIAhGJrpkJDwsD
  [...]

> Can i recover original image file from the string?

Yes, it's just a base64 encoded png.

So place the text in a region in Emacs and go M-x base64-decode-region,
and you get:


[-- Attachment #2: face.png --]
[-- Type: image/png, Size: 666 bytes --]

[-- Attachment #3: Type: text/plain, Size: 180 bytes --]



  Best regards,

    Adam

-- 
 "It's not denial. I'm just very selective about the        Adam Sjøgren
  reality I accept."                                   asjo@koldfront.dk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Q] Face header string to original image file
  2020-01-03 15:28 ` Adam Sjøgren
@ 2020-01-03 19:43   ` 황병희
  0 siblings, 0 replies; 3+ messages in thread
From: 황병희 @ 2020-01-03 19:43 UTC (permalink / raw)
  To: The Gnus

Adam Sjøgren <asjo@koldfront.dk> writes:

> 황병희 writes:
>
>> iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVMM2UIAhGJrpkJDwsD
>   [...]
>
>> Can i recover original image file from the string?
>
> Yes, it's just a base64 encoded png.
>
> So place the text in a region in Emacs and go M-x base64-decode-region,
> and you get:

Wow thanks Adam^^^

Sincerely,

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 13:59 [Q] Face header string to original image file 황병희
2020-01-03 15:28 ` Adam Sjøgren
2020-01-03 19:43   ` 황병희

Gnus development mailing list

Archives are clonable: git clone --mirror http://inbox.vuxu.org/ding

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git