473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

ImageMagick output in browser

1
Hi, has established ImageMagick. The standard example from docs has followed:

Expand|Select|Wrap|Line Numbers
  1. #include <string>
  2. #include <iostream>
  3. #include <Magick++.h>
  4.  
  5. using namespace std;
  6. using namespace Magick;
  7.  
  8. int main(int /*argc*/,char **/*argv*/)
  9. {
  10. try {
  11. // Create base image (white image of 300 by 200 pixels)
  12. Image image( Geometry(300,200), Color("white") );
  13.  
  14. // Set draw options
  15. image.strokeColor("red"); // Outline color
  16. image.fillColor("green"); // Fill color
  17. image.strokeWidth(5);
  18.  
  19. // Draw a circle
  20. image.draw( DrawableCircle(100,100, 50,100) );
  21.  
  22. // Draw a rectangle
  23. image.draw( DrawableRectangle(200,200, 270,170) );
  24.  
  25. // Display the result
  26. image.display( );
  27. }
  28. catch( exception &error_ )
  29. {
  30. cout << "Caught exception: " << error_.what() << endl;
  31. return 1;
  32. }
  33.  
  34. return 0;
  35. }
  36.  
As a result of script start I receive an error in logs Apache:
Premature end of script headers, in the browser 500

Chmod 755, owner and group - that from whom I start.
Help pleace, thanks!
Sep 17 '10 #1
1 2021
Markus
6,050 Expert 4TB
You're not sending any heads to the browser.

Read up on HTTP headers - you'll need to send the Content-type header.
Sep 19 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: shanergb | last post by:
Hi all. I'm creating a web-based application that uses PHP, MySQL & Apache on a Windows platform. What I need to do is create images on the fly with either GD or ImageMagick, display them on the...
3
by: Prabhat | last post by:
Hi All, I have IE6.0 SP1 and I executed one asp file with the below script to check the browser capability but see the result below the script...Copied from MSDN :) <% Set bc =...
7
by: Chakra | last post by:
I have been designing my ASP.NET forms by just placing the controls on the form. However, i noticed that some people used a HTML table as the parent control, and then placed the ASP.NET server...
0
by: Chakra | last post by:
With the code that you looked at: do the authors explicitly say they use table to accomplish browser neutrality? It may be their intention, but I doubt whether that's what they actually achieve....
6
by: ph1975 | last post by:
Hi Folks, the following problem occured: i use imagemagick (Version: ImageMagick 6.2.2 05/26/05 Q16 on Fedora Core 3 Server) When i manually (on bash) execute: /usr/bin/convert -size...
6
by: eholz1 | last post by:
Hello Users, I am not sure if this is the place to post an imagemagick question - please advise. I have imagemagick 6.3 installed, runs from command line ok, etc. I have tried (several times...
2
by: Chuck Anderson | last post by:
I am trying to use ImageMagick to create thumbnails on the fly - without having to save the image to a file. I have gotten it to work by using passthru($cmd, $retval), but I want to use...
3
by: femtox77 | last post by:
Hi to all!!! I'm trying to convert a pdf file into an image, for example JPG or PNG format, with ImageMagick. I use the command line. For example: convert header.pdf header.jpg. But I obtain a...
0
by: empiresolutions | last post by:
I am working with a TIF to JPG conversion that will result in the JPG being printed from a web page. My issue is the final JPG image prints VERY blurry. The TIF file that has the following...
15
by: jools | last post by:
I'm having trouble modifying some code written by someone else. The code is very dense and obscure but does work fine. However I need to insert a block of my own and I've hit what I assume is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.