?
Solved

image html format

Posted on 2005-04-04
3
Medium Priority
?
158 Views
Last Modified: 2010-04-09
I am trying to use html to display some images from a database.  I have the advice to use something like this:

 def send_image(channel, img, format='gif'):
  channel.write('HTTP/1.0 200 OK\r\n')
  channel.write('Content-Type: image/%s\r\n' % format)
  channel.write('Content-Length: %d\r\n' % len(img))
  channel.write('\r\n')
  channel.write(img)

I wonder what the format string is for a jpeg.  Is it jpg or jpeg?
0
Comment
Question by:astar666
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 14770850
image/jpeg
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 14801675
PAQed with points (250) refunded

DarthMod
Community Support Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question