i have a encode binary picture in database , i want to show the photo with flask . So i need to decode and after that, show it in the browser. I dont want to use html file, i know that i can do it without html.
I have this code , but it is only from directory , i dont know how decode the data and show
PATH_FILES = getcwd() + "/files/"
#images.route("/file/<string:name_file>")
def get_image(name_file):
return send_from_directory(PATH_FILES, path=name_file, as_attachment=False)
imagine that already have de encodeData:
encodeimage=b'/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBYVFRgWFRYYGBgZHBoYGBwcGhwcHBweHBwcHhwcGhwdIS4nHB4rIRoYJjgmKzAxNTU1GiQ7QDs0Py40NTEBDAwMEA8QHhISHzQsJCs0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NP/AABEIALkBEAMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAADAQIEBQYAB//EAEAQAAECBAMECAMHAwQCAwEAAAECEQADITEEEkFRYXGBBQYiMpGhscET0fAUQlJygpLhB2KyIzPC8STSY5OiNP/EABkBAAMBAQEAAAAAAAAAAAAAAAABAgMEBf/EACYRAAICAgEEAgMBAQEAAAAAAAABAhEDITEEEkFRIjITYYFxkRT/2gAMAwEAAhEDEQA/AEkGH4U15mAyLjhD8Me0eMecel4JmK7hh2DMMxPcMJhDCXIPgF0kGWOEPlDsmB9I99MFl2MJ/YqPANGnCCT+59bYDK04Qacp0Pvgu2KqQXCWhZ57XKG4U0hMSe0OEOLolqwqEuYhnvHjEyWfrlENfePGCTsIqibhe7y9oZh9Idhi6T9aQ/DYdf4Tzp6wKLa0Epxi7boLO7hhuHiT9kUpJHoHgsrABN1Dx+TxrHDN+Dml1eKPmyHj6oTuNIjynsHdouTKR+biPnCsNBGq6Z+WYS6+K1FFacMopSG8eG+CycEqnL6rE4Ew1Swz3Hja8aLp4+Tnl12R8aArwYLZjbe/pCokITYE6fTvCmeks3aG1LFuIFYaVqLsngf/AGSpotY4x4RjLqMkuWzp8tKgKM1i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Iu7BtKa7HY3h8xNgVUG/hcNwiLh7jgPaH43vq4pgAerYQK12e/kTC0argW0B/wC+EDkf7iv0w9H3oQDynQPQbHvewvrzrDFq3kG9iddXsXhFW/SPQQGZc8/+MAEhSwxtS59TspA1E6Oa6fXCsScFc8Ve0NHzhoAExy9WBaouOAo/8wqxa1K1IAB8PqsGnafWyBjv8j6iEgP/2Q=='
so how can i do it ?
its a base64 encoded image, you can use it as in below example:
<!DOCTYPE html>
<html>
<head>
<title>Display base64 Image</title>
</head>
<body>
<img src='data:image/jpeg;base64, /9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBYVFRgWFRYYGBgZHBoYGBwcGhwcHBweHBwcHhwcGhwdIS4nHB4rIRoYJjgmKzAxNTU1GiQ7QDs0Py40NTEBDAwMEA8QHhISHzQsJCs0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NP/AABEIALkBEAMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAADAQIEBQYAB//EAEAQAAECBAMECAMHAwQCAwEAAAECEQADITEEEkFRYXGBBQYiMpGhscET0fAUQlJygpLhB2KyIzPC8STSY5OiNP/EABkBAAMBAQEAAAAAAAAAAAAAAAABAgMEBf/EACYRAAICAgEEAgMBAQEAAAAAAAABAhEDITEEEkFRIjITYYFxkRT/2gAMAwEAAhEDEQA/AEkGH4U15mAyLjhD8Me0eMecel4JmK7hh2DMMxPcMJhDCXIPgF0kGWOEPlDsmB9I99MFl2MJ/YqPANGnCCT+59bYDK04Qacp0Pvgu2KqQXCWhZ57XKG4U0hMSe0OEOLolqwqEuYhnvHjEyWfrlENfePGCTsIqibhe7y9oZh9Idhi6T9aQ/DYdf4Tzp6wKLa0Epxi7boLO7hhuHiT9kUpJHoHgsrABN1Dx+TxrHDN+Dml1eKPmyHj6oTuNIjynsHdouTKR+biPnCsNBGq6Z+WYS6+K1FFacMopSG8eG+Cyc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y+whqP+JhgBQFJYhatoBUQz3bYYlLxc0py51EWu5Z20FT/MRU98c/+Ucr735l+0DbH3MIhJzCgIqXB82aukONDUE2NLfPbEedpwPoqI474+tsIZYpIu7BtKa7HY3h8xNgVUG/hcNwiLh7jgPaH43vq4pgAerYQK12e/kTC0argW0B/wC+EDkf7iv0w9H3oQDynQPQbHvewvrzrDFq3kG9iddXsXhFW/SPQQGZc8/+MAEhSwxtS59TspA1E6Oa6fXCsScFc8Ve0NHzhoAExy9WBaouOAo/8wqxa1K1IAB8PqsGnafWyBjv8j6iEgP/2Q==' />
</body>
</html>
if you save the above file as html and open it with a browser, you will see the actual image.
Related
cv2.imshow("preview", img)
This is my code sample which shows image "img" using imshow...But i want to show that image in a html page.How is this possible without flask and in easy way? Sorry if my question was not relevant since I am new to python.
Probably the easiest would be to save the image to some file locally and have an HTML file next to it that references the image. I.e.
# in your Python
cv2.imwrite("image.png", img)
And then the HTML file would be something like
<!DOCTYPE html>
<html>
<body>
<img src="image.png">
</body>
</html>
I am trying to scrape a Japanese website (a trimmed down sample below):
<html>
<head>
<meta charset="euc-jp">
</head>
<body>
<h3>不審者の出没</h3>
</body>
</html>
I am trying to get data of this html by request package using:
response = requests.get(url)
I am getting data from h3 field in as:
'¡ÊÂçʬ' and unicode value of it is like this:
'\xa4\xaa\xa4\xaa\xa4\xa4\xa4\xbf\'
but when I load this html from a file or from a local wsgi server (tried with Django to serve a static html page) then I get:
不審者の出没. It's actual data.
Now I am not understanding how to resolve this issue?
I am trying to render some basic umlauts with jinja2.
test.html
<!doctype html>
<link type="text/css" rel="stylesheet" href="style.css"/>
<meta charset="UTF-8">
<h3>Umlauts: ä ü ö</h3>
Result.html
<!doctype html>
<link type="text/css" rel="stylesheet" href="style.css"/>
<meta charset="UTF-8">
<h3>Umlauts: ä ü ö</h3>
My code
from jinja2 import Template
file = open("test.html")
data = file.read()
Template(data).stream().dump("index.html")
Now I don't understand how to get jinja to process the umlauts correctly. How can I do this? I am using stream, because in my actual usecase I am providing some data to fill in, then dumping it to an html to be displayed.
EDIT: Is what I want even possible? As I understand this from here it is not?
It is not possible to use Jinja2 to process non-Unicode data. The
reason for this is that Jinja2 uses Unicode already on the language
level. For example Jinja2 treats the non-breaking space as valid
whitespace inside expressions which requires knowledge of the encoding
or operating on an Unicode string.
With Python3 you can specify the encoding with open.
from jinja2 import Template
file = open("test.html", 'r', encoding='utf-8')
data = file.read()
Template(data).stream().dump('index.html')
For Python2 you can use the io module to specify encoding.
import io
file = io.open("test.html", 'r', encoding='utf-8')
I am writing a web app using Django 1.4.I want one of my view to output mirosoft word docs using the follwoing codes:
response = HttpResponse(view_data, content_type='application/vnd.ms-word')
response['Content-Disposition'] = 'attachment; filename=file.doc'
return response
Then ,I can download the file.doc successfully ,but when I open the .doc file ,I only find the raw html like this
<h1>some contents</h1>
not a heading1 title.
I am new to python & Django ,I know this maybe some problems with html escape,can some one please help me with this ?
Thank you !:)
Unless you have some method of converting your response (here HTML I assume) to a .doc file, all you will get is a text file containing your response with the extension .doc. If you are willing to go for .docx files there is a wonderful python library called python-docx you should look in to that allows you to generate well formed docx files using the lxml library.
Alternatively, use a template such as:
<html>
<head>
<META HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=UTF-8"">
<meta name=ProgId content=Word.Document>
<meta name=Generator content=""Microsoft Word 9"">
<meta name=Originator content=""Microsoft Word 9"">
<style>
#page Section1 {size:595.45pt 841.7pt; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}
div.Section1 {page:Section1;}
#page Section2 {size:841.7pt 595.45pt;mso-page-orientation:landscape;margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}
div.Section2 {page:Section2;}
</style>
</head>
<body>
<div class=Section2>
'Section1: Portrait, Section2: Landscape
[your text here]
</div>
</body>
</html>
This should, according to this asp.net forum post make a valid .doc file when returned as mime type application/msword using UTF-8 charset (so make sure strings are all unicode).
I have this complicated problem that I can't find a answer to.
I have a Python HTTPServer running that serves webpages. These webpages are created at runtime with help of Beautiful Soup. Problem is that the Firefox shows HTML Code for the webpage and not the actual page? I really don't know know who is causing this problem -
- Python HTTPServer
- Beautiful Soup
- HTML Code
Any case, I have copied parts of the webpage HTML:-
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
My title
</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="./123_ui.js">
</script>
</head>
<body>
<div>
Hellos
</div>
</body>
</html>
Just to help you, here are the things that I have already tried-
- I have made sure that Python HTTPServer is sending the MIME header as text/html
- Just copying and pasting the HTML Code will show you correct page as its static. I can tell from here that the problem is in HTTPServer side
- The Firebug shows that is empty and "This element has no style rules. You can create a rule for it." is displayed
I just want to know if the error is in Beautiful Soup or HTTPServer or HTML?
Thanks,
Amit
Why are you adding this at the top of the document?
<?xml version="1.0" encoding="iso-8859-1"?>
That will make the browser think the entire document is XML and not XHTML. Removing that line should make it render correctly. I assume Firefox is displaying a page with a bunch of elements which you can expand/collapse to see the content like it normally would for an XML document, even though the HTTP headers might say it's text/html.
So guys,
I have finally solved this problem. The reason was because I wasn't sending MIME header (even though I thought I was) with content type "text/html"
In python HTTPServer, before writing anything to file you always do this:-
self.send_response(301)
self.send_header("Location", self.path + "/")
self.end_headers()
# Once you have called the above methods, you can send the HTML to Client
self.wfile.write('ANY HTML CODE YOU WANT TO WRITE')