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

How to get a barcode with file format ppm for RWH's ch12?

I am studying RWH's Ch12 Barcode Recognition. For understanding the contents more deeply, I want to generate a barcode with the file format ppm from scratch, but it is difficult for me to get a file *.ppm. Generally, the free online Barcode…
abelard2008
  • 1,984
  • 1
  • 20
  • 35
1
vote
0 answers

Why are the pixel bars in a ppm image diagonal instead of horizontal or vertical?

I have to create country flags displayed in a ppm file. I have the program below working except when I display the flags the stripes are diagonal instead of vertical for the French flag or horizontal for the other two. I know that it is something…
1
vote
1 answer

Using a regex for importing dimensions in a ppm file

I’ve a problem finding the proper regex to read a ppm file dimensions. I don’t know if it’s because my regex is wrong or if I misuse the Pattern.compile method, but I get a java.util.NoSuchElementException. Below my regex and the code along to it.…
Lapsusone
  • 79
  • 6
1
vote
1 answer

How can I concatenate PNM files as arrays?

I want to write a function that concatenates (left to right) two PNM (P6) files that are stored pixel-by-pixel in Image classes. I have the function set up as follows: void LRConcatenate() { Image* input1 = GetInput(); Image* input2 =…
Miss Rainbowdash
  • 205
  • 1
  • 10
1
vote
1 answer

Basic file I/O of a ppm file

I'm trying to write a program to read through a .ppm file and keep the data in a struct. To be able to do that though, I need to be able to open the file, which is not working so far. I'm obviously doing something wrong. Can you please take a look…
imre
  • 379
  • 2
  • 6
  • 17
1
vote
2 answers

trouble reading an array from a file into an array then printing it to another file

Hey guys i'm trying to make this piece of code work in c, I've got a data file that looks like this: 123 456 789 101 121 131 415.... it's data for an image, those numbers are in a grid of 256X128, I'm trying to read in those numbers using nested…
rfnrf
  • 13
  • 2
1
vote
0 answers

Save ppm in Android

I'm newbie using images in Android and I need some hel saving an image in ppm format. I'm using OpenCV to capture an image in byte[] format. I know how to save it in .jpg but I need to save it in .ppm instead There (Android GIMP JPG to PPM…
Goblinch
  • 517
  • 3
  • 9
  • 21
1
vote
3 answers

C - "warning: format "%c" expects argument of type "char *", but argument 3 has type "int":?

I am writing code to read a PPM file into a struct pixel_type array containing 3 unsigned chars r,g, and b. The code that causes problems looks like this: struct pixel_type pArray[width][height], *pPtr[width][height]; pPtr[width][height] =…
1
vote
1 answer

My function is copying a PGM image file to PPM in a different way

I have a very simple function that saves a PPM image: void WriteCImage(CImage *cimg, char *filename) { FILE *fp; int i,n; fp = fopen(filename,"w"); fprintf(fp,"P6\n"); fprintf(fp,"%d %d\n",cimg->C[0]->ncols,cimg->C[0]->nrows); …
mad
  • 2,677
  • 8
  • 35
  • 78
1
vote
1 answer

Why is my image from my ppm file a little off?

The task is to create an image of the russian flag on an image with 800 columns and 600 rows. So, the flag is divided into three equal sections (white on top, blue in the middle, and red on the bottom) Here's my code: #include int main()…
user2387766
1
vote
1 answer

Windows batch file to install multiple perl modules - only the first line runs

I'm installing Bugzilla on Windows, and checksetup.pl asked me to install a bunch of modules by running ppm (Perl Package Manager) commands like so: C:\>ppm install TimeDate This runs correctly, and installs the TimeDate module. I haven't done much…
Excrubulent
  • 467
  • 7
  • 15
1
vote
1 answer

ppm to mkv/avi/mp4 converted video using ffmpeg can't be opened by Lightworks but can be viewed perfectly fine

I am trying to make gource work for my own personal project. I set everything up and already converted the ppm output to a video file. I can open and watch the file without having any problems. But when it comes to editing the program Lightworks…
BrainStone
  • 3,028
  • 6
  • 32
  • 59
1
vote
3 answers

Black to Red fade on ppm using python

Python How do I manipulate this code to give me an image that fades from black to red going from left to right, where left would be black and fade to red going right. def main(): f = open("testImage.ppm","w") f.write("P3 \n") width=256 …
1
vote
2 answers

What is a ppmreader and how to open a ppm file in matlab

i am trying to open a .ppm file in matlab how do i go about it? i = imread('pic.ppm'); there are ppm readers online. what is this file conversion ? and how do i read from a ppm file?
simplycurious
  • 796
  • 7
  • 15
0
votes
1 answer

Writting a P6 .ppm in ASCII using ASCII/UTF8 data from Textbox. Encoding Confusion?

Im having some general confusion with encoding on a little tool I'm writing. First of all I apologise that the following code is a little butchered but of the code I have written so far, it's the closest to actually working. If I use the following…
chrispepper1989
  • 2,100
  • 2
  • 23
  • 48