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
1
vote
1 answer

Bus error 10 with 2d array of struct inside struct

I'm having issues filling a 2d array of a struct inside a struct. It allows me to do it for pixels[0][1], pixels[0][2]....etc. However, once I increase the first index i.e pixels[1][1], I get a bus error 10. Any help would be appreciated. I've cut…
user5510766
1
vote
1 answer

Creating a PPM Image to be Written to a File Java

so I am working on a program in java which creates the a rectangular image (see link below) as a ppm image that would be further written into a ppm file. Creating and writing the image to the file I get. However, I am having difficulty creating the…
k-Rocker
  • 147
  • 2
  • 9
1
vote
1 answer

how to make ffmpeg output frames at correct rate down to millisecond

using ffmpeg, i am fetching frames from udp stream (hd264 at 25 fps) using following command: ffmpeg -loglevel debug -i udp://231.20.20.146:2005 -fflags nobuffer -r 1 -preset ultrafast -vf scale=432:243 -f image2pipe -vcodec ppm pipe:1 at the other…
Pavel K.
  • 6,697
  • 8
  • 49
  • 80
1
vote
1 answer

C Display PPM image as Text

I am new to programming C and i am experimenting with file manipulation, i am trying to output a PPM file with its comments and rgb data values like so: P3 # The same image with width 3 and height 2, # using 0 or 1 per color (red, green, blue) 3 2…
Sean Turnbull
  • 39
  • 1
  • 8
1
vote
0 answers

ppm image blur filter creates 8 separate images

I'm kinda new to c++ and I have an assignment for my course to read a P6 ppm image and use some filters on it.Im stuck on the blurring one and I cannot find my logical error on my code. My problem is that the output image is blurred but it is like…
Dimitris
  • 23
  • 6
1
vote
1 answer

convert video into ppm files

I have found a tutorial to convert a video into ppm. http://webcache.googleusercontent.com/search?q=cache:http://dranger.com/ffmpeg/tutorial01.html&gws_rd=cr&ei=BU9tWNyFNsvCjwTXqbuwDg However, I don't get why width*3 here. void SaveFrame(AVFrame…
tracer_rock
  • 165
  • 1
  • 3
  • 9
1
vote
0 answers

How do I convert to ppm to bmp in c++?

I am trying to implement a ray tracer in c++. I've found a code which makes a ppm file. However I am trying to do a bmp file. How can I directly convert ppm to a bmp in c++ code? I've tried this function however my reflections aren't quite accurate…
theycallmefm
  • 67
  • 1
  • 8
1
vote
1 answer

Perl Package Manager (PPM) installing modules in C:\TEMP\perl---please-run-the-install-script---/

I am using ActivePerl and tried to install a module using PPM(Perl Package Manager) The installation is happening in the folder C:\TEMP\perl---please-run-the-install-script---/. Can anybody tell me why this is happening? And how I solve this problem…
shinoy.m
  • 151
  • 1
  • 2
  • 10
1
vote
0 answers

How to double the height and width of a ppm file

I'm trying to build a really basic PPM picture editor. I've got it to where I can open the file, and print out a copy of the picture in a different file. Now I'm trying to work on growing/shrinking the picture. Right now, I'm trying to figure out…
Ben Large
  • 11
  • 1
1
vote
2 answers

C++ working with PPM images

I am trying write a function that reads PPM images and the function should return the contents. PPM images have the following text format: P3 numOfRows numOfColumns maxColor numOfRows-by-numOfColumns of RGB colors Since the text format has a…
roulette01
  • 1,984
  • 2
  • 13
  • 26
1
vote
1 answer

Reading PPM image in C++ missing last pixel

I am attempting to read a PPM image from standard input with this code: cin >> format; cin >> ppm->width >> ppm->height >> ppm->colourMax; for (int r = 0; r < ppm->height; r++) { ppm->pixels[r] = new Pixel[ppm->width]; for (int c = 0; c <…
DBoyer
  • 3,062
  • 4
  • 22
  • 32
1
vote
1 answer

Antialiasing a PPM file

I got this output from the code below circle.ppm and it has a lot of jaggy edges. I need some type of antialiasing method I believe, but I have trouble getting started. What would be the simplest way of getting rid of them? //********************…
1
vote
2 answers

How to make image magic convert output ppm to stdout

I am writing some image processing routines. My image class supports reading and writing images in the ppm (P6) format. To use other types of images I wanted to convert them to a ppm through image magic convert. To do this I need convert to write…
chasep255
  • 11,745
  • 8
  • 58
  • 115
1
vote
0 answers

Creating PPM files with PHP

I want to be able create a PPM file from text using PHP that can be displayed on an RGB LED matrix display. That means I need to build the image pixel-by-pixel, row-by-row. I managed to do it using one character as input. I want to able to do it…
Fonyo
  • 11
  • 2
1
vote
2 answers

Convert PPM Image to Greyscale C++

Trying to convert a PPM Image to greyscale by indexing the pointer containing the pixel data: void PPMObject::greyScale() { const float r = 0.299F; const float g = 0.587F; const float b = 0.114F; int size = this->width *…
user4640007
  • 97
  • 1
  • 2
  • 7