Questions tagged [ppm]

PPM is a pixmap image format used by the Netpbm library and other graphics software.

Portable Pixel Map (PPM) is a simple format for 24-bit color images.

The format allows data to be stored in either ASCII or binary format. PPM is the native format of the Netpbm graphics library and the format is described on the Netpbm web site. It is part of a family of formats including , , and , collectively tagged (the original name for what is now the Netpbm library).

280 questions
0
votes
1 answer

Why is a PPM6 file smaller than a PPM3 file?

Maybe it's a weird question but I'm little confused why PPM6 is smaller than PPM3. According to wiki, in PPM3, each pixel is represented as 3 bytes P3 # The P3 means colors are in ASCII, then 3 columns and 2 rows, # then 255 for max color, then RGB…
theateist
  • 13,879
  • 17
  • 69
  • 109
0
votes
1 answer

bitmap inverted color

Some time ago I asked a question about saving hwnd into ppm file. Thanks to a stackoverflow user I have solved my issue. Iy's work correctly but I still have a problem: the red and blue color are inverted. the code and my previous question where…
ramone
  • 266
  • 1
  • 2
  • 10
0
votes
1 answer

hwnd to ppm issue

I have a function which save a hwnd into a ppm file. This function is inspired by a msdn example. Both the msdn sample and my function work but ... I have an issue ... But first, here is the function. int CaptureAnImage(HWND hWnd) { HDC…
ramone
  • 266
  • 1
  • 2
  • 10
0
votes
2 answers

Haskell data type error PBMfile

i am doing my homework and have an error I have to do a functions about a data type described now data RGBdata= RGB Int Int Int data PBMfile= PBM Int Int [[RGBdata]] And his show functions instance Show RGBdata where show (RGB r g b) = (show r)++"…
user495943
  • 13
  • 3
0
votes
1 answer

Python graphics skipping every other pixel when drawing a .PPM file from a function

I'm writing a program for a college course. I import a .PPM file saved as a 2-d array from main into the function. Then I have to update the pixels of a graphics window (which is opened in main) using .setPixel and color_RGB() method and functions. …
Pyrok
  • 53
  • 1
  • 7
-1
votes
1 answer

Vertical gradient formula

I want to write a C program that produces 1000x1000 .ppm file, showing a vertical gradient from black(left) to white (right). Now, if the picture would be 256x256 it would be easy: P3 256 256 255 0 0 0 1 1 1 2 2 2 .... 255 255 255 0 0 0 1 1 1 2 2 2…
Andrei0408
  • 197
  • 7
-1
votes
1 answer

how to recover lost AWS .pem file and putty key, which are lost due to any virus

Yesterday I downloaded Filezilla, after the downloading, I got warn message from my computer, and when I checked the download folder, all data were deleted including putty key and .PPM file. could anyone explain me please, how can I recover these…
-1
votes
1 answer

TEXT to IMAGE converter in C++ without using any libraries

I am currently working on a coding task in which i am required to create a program which takes a string as an input and return a ".ppm" image of that text. I can't figure out a way as to how i should go about solving this problem without using an…
-1
votes
2 answers

Read ppm header information and output to console and output file in C

Beginning to learn C; I'm trying to read and process characters as I come to them while discarding whitespace characters. I need to also determine if it's a comment '#' or the first character of the next input value. The goal is to obtain and write…
Michael
  • 3
  • 3
-1
votes
1 answer

Converting a ppm file into ASCII art

I'm trying to write a code for converting a ppm image into ASCII art. I've written my code but this is not working properly. In fact, it's showing something clearly different from the original image. I have read the ppm file and wrote the ASCII art…
-1
votes
1 answer

C++: Issues with manipulating a PPM file

I'm working on a program that can perform various effects and manipulations on a PPM file. However for testing reasons, it uses cin rather than an input file. It is supposed to be able to perform multiple effects at once, but I am having trouble…
cec526
  • 1
  • 2
-1
votes
1 answer

ppm file, object declaration to a compoment

So, i have a ppm file and in the ppmformat.cpp, i have imaging::component_t *buffer = new imaging::component_t[3*numCol*numRow];. What i declare with this? I want a buffer with(3*numCol*numRow) size, but i cant understand what the use of…
-1
votes
1 answer

How to read and write a ppm file?

I try to read a ppm file aand create a new one identical. But when I open them with GIMP2 the images are not the same. Where is the problem with my code ? int main() { FILE *in, *out; in = fopen("parrots.ppm","r"); if( in == NULL ) …
-1
votes
1 answer

Reading Changing and printing a PPM image

I have found code on stack overflow to do this but I'm having some errors using it. I'm not sure what I'm doing wrong because I don't have much experience with ppm files. Thank you all for any help. typedef struct { int x, y; PPMPixel…
user4766244
  • 69
  • 1
  • 2
  • 8
-1
votes
2 answers

In Linux,pdftoppm command is running two processes for single file

root@test:/var/lib/tomcat/webapps/logs# ps aux | grep ppm root 25522 0.0 0.0 1844 500 ? SN 14:13 0:00 sh -c /bin/bash -c "pdftoppm -f 1 -l 1 /pdf/input.pdf test/processing/output" root 25523 49.6 0.7 18192 12620 ? …
MaNn
  • 745
  • 4
  • 11
  • 22
1 2 3
18
19