Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not open these pnm #1

Open
Charltsing opened this issue May 10, 2023 · 4 comments
Open

can not open these pnm #1

Charltsing opened this issue May 10, 2023 · 4 comments

Comments

@Charltsing
Copy link

2JohnC1V3.zip

@atiksoftware
Copy link
Owner

@Charltsing sory for late.
your file is 2JohnC1V3.ppm start with

P6
707  
441  
255

it should be

2 Byte magic
width - height
max value

like:

P6
707 441  
255

@Charltsing
Copy link
Author

Charltsing commented May 18, 2023

https://netpbm.sourceforge.net/doc/
https://netpbm.sourceforge.net/doc/ppm.html

A "magic number" for identifying the file type. A ppm image's magic number is the two characters "P6".
Whitespace (blanks, TABs, CRs, LFs).
A width, formatted as ASCII characters in decimal.
Whitespace.
A height, again in ASCII decimal.
Whitespace.

Whitespace not only blanks, ,but also TABs, CRs, LFs

@Charltsing
Copy link
Author

PPM、PGM、PBM
"white space" character is space, CR, LF, TAB, VT, or FF (I.e. what the ANSI standard C isspace() function calls white space).

PAM Header
Each line ends with and is delimited by a newline character. an example header:

P7
WIDTH 227
HEIGHT 149
DEPTH 3
MAXVAL 255
TUPLTYPE RGB
ENDHDR

@atiksoftware
Copy link
Owner

@Charltsing its updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants