How do you print an image in mips?

In summary: The goal is to print a bitmap image on a printer. There are various programs that can help you with this.
  • #1
cjj
2
0
hi guys I have been having a bit of trouble with this one and I am a bit all over the place. I know the things like setting up pointers, 2-d array, reserving stack frame space, having offsets. but is printing an image very different from printing a pixel or printing an integer? Also if I need to show some sort of code for this let me know and I wwill attempt it.

I'm really a newbie at it, any other helpful resources aimed at printing bitmap images are welcome.
 
Technology news on Phys.org
  • #2
It depends on your operating system. Windows has all the tools and APIs necessary (but the last time I looked, the basic documentation filled 5 thick books). I do not know about Linux, but I think you want to study the Trolltech libraries. Android - I haven't a clue.
 
  • #3
cjj said:
I'm really a newbie at it, any other helpful resources aimed at printing bitmap images are welcome.

You should explain the goal more clearly. Do you want to print an image only on a particular brand of printer? Or do you want a brand-independent program?

Glancing at the web, there are various programs that convert bitmap images to Postscript. You could use various programs that handle Postscript to print the images. If your goal is to write a program that handles all the details, you could study HP Printer Command Language. http://en.wikipedia.org/wiki/Printer_Command_Language
 
  • #4
hi sorry for not explaining i just want a code a program to output a bitmap image in the console for mips assembly like qtspim. but having diifficulty finding the guidelines to do this.
 
  • #5
cjj said:
hi guys I have been having a bit of trouble with this one and I am a bit all over the place. I know the things like setting up pointers, 2-d array, reserving stack frame space, having offsets. but is printing an image very different from printing a pixel or printing an integer?
Yes, it's very different. MIPS is a very low -level programming language that doesn't even have an API that I'm aware of for printing something even as simple as a text file. let alone a bitmap image.
cjj said:
Also if I need to show some sort of code for this let me know and I wwill attempt it.

I'm really a newbie at it, any other helpful resources aimed at printing bitmap images are welcome.
 

1. How do I load an image in MIPS?

To load an image in MIPS, you will need to use the lw instruction to load the image data into a register. You will also need to specify the address of the image and the size of the image in bytes.

2. How do I display an image in MIPS?

To display an image in MIPS, you will need to use the syscall instruction to call the appropriate system call for displaying an image. You will also need to specify the address of the image, the width and height of the image, and the format of the image data.

3. How do I convert an image to a format that can be printed in MIPS?

In order to print an image in MIPS, you will need to convert it to a format that is compatible with the printing system. This can be done using image processing libraries or by manually converting the image data into a format such as BMP or JPEG.

4. How do I set the resolution for printing an image in MIPS?

The resolution for printing an image in MIPS can be set by specifying the appropriate parameters in the system call for displaying the image. You can also adjust the resolution by manipulating the image data before displaying it.

5. How do I print a specific part of an image in MIPS?

In order to print a specific part of an image in MIPS, you will need to manipulate the image data before displaying it. This can be done by specifying the coordinates of the desired portion of the image and adjusting the image data accordingly before calling the system call for displaying the image.

Similar threads

  • Programming and Computer Science
Replies
5
Views
995
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Programming and Computer Science
Replies
21
Views
1K
  • Programming and Computer Science
Replies
3
Views
324
Replies
11
Views
2K
  • Programming and Computer Science
Replies
5
Views
1K
Replies
2
Views
899
  • Programming and Computer Science
Replies
7
Views
6K
  • Programming and Computer Science
Replies
1
Views
8K
  • Programming and Computer Science
Replies
20
Views
31K
Back
Top