How does it happen
i read the raw data of a pgm image file and got the following output
P5
# created by ilidss
512 512
255
162
160
161
165
65533
164
162
165
But 65533 is impossible because the max value of a pixel is 255. the following is the rough code:
bufferredreader in = ...... //bufferedreader read data from lena.pgm
for (int i=0; i<4;i++) system.out.println(in.readLine());
//read four-line header
for (int i=0; i<8;i++) system.out.println(in.read());
//read raw data which is binary value according to magic line indicating "P5"
Could anyone tell me what's going on!
thank you indeed!
the PGM image format is composed of tow parts: header and data
header includes three lines at least 3 lines
1.magic line: can be P5 OR P2.P5 means the data is binary representation. P2 indicates the image data is ascii text format.
2.dimension: eg. 8 8 means 8*8 totally 64 pixels
3.max pixel value: every pixel value should be less than it
4.comment starting with #, it is optional and can be everywhere. it cannot more than 70 charactors.
data is the raw image data
an example
P2 # ascii text format rather than binary
8 4 # 32 pixel
15
0 0 0 0 0 0 15 15
15 15 0 0 0 0 0 0
0 0 11 11 0 0 0 0
0 0 0 0 13 13 0 0
thank you very much. in my case, i am reading a P5 image which contains binary data
Similar Messages
-
Under search history in the Maps app,...along with all the other places I
did search for, some addresses comes up that I'm not familiar with, and they stay
there. In some cases I didn't search for them at all. Some I may have. A name also
appears, under the address, like "from John Doe". It’s a name that
I'm familiar with my email, but is not in my contacts. Why and how does
this happen?
For example, a person I receive emails from for work, came up as the
"from", and the address, after I searched for it (not on my phone).....I found out
it was the address of his company, I place I've never searched for, nor is
there a hyper-link to it any emails/websites that I could have clicked on
accidentally.
In another example, the beginning of an address “5165” which I may have searched
for and starting typing in came up in the history with several locations that
start with those numbers. Most of them say “from current location”, but one says from
a name, whom again I’m familiar with by email, but is not in my contacts and
have no idea of why the name would be somehow connected to the address.Thank you for the reply. I really appreciate it. Do you know why the names are attached, as "from"?
I attached a screen shot image. "Harry" and "Angela" are not contacts in my phone. Who would their names get there? -
I have an apple id; but when I try to sign in to iCloud, I get the msg that the apple id is not an iCloud account. However, apple was able to bill me for my non-existent iCloud account. How does that happen?
If you didn't create an iCloud account on an iOS device or Mac, you don't have one. You can't create an account on a PC. If you were charged for an iCloud storage upgrade without having an account, contact the Apple online store at the bottom of this page for a refund.
-
I was using my notes earlier today and now for some reason they are all gone. How does this happen and is there anything I can do to get them back, the new ones also that haven't been synced.
See Recover your iTunes library from your iPod or iOS device.
tt2 -
How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain?
Greetings,
I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
Good Luck - Cheers,
M. -
n Mac Mail on OS 10.5.8 I am receiving bogus emails which claim to be sent by people in my address book, but actually are not. How does this happen and how can I correct this problem
You said:
I am receiving bogus emails which claim to be sent by people in my address book, but actually are not.
...and:
Are you saying that my address book has not been hacked into? That others are getting these email addresses from another source?
This confuses me. Are you saying that you are receiving bogus e-mails from some of your contacts, or are you saying that they are receiving bogus e-mails from you?
If the latter, there are a number of reasons that people might be getting e-mail from you. Malware, though technically possible, is extremely unlikely. See Someone is sending messages from my e-mail address!
If the former, that's rather unusual. The only decent explanation I can think of is that a bunch of your Windows-using contacts got infected with something and their machines are being used to spam everyone in their contact lists, which would include you. -
I updated to ios8 and tried to use Health Application. In Sources I get a message that other applications will show up on the list as they request permission to update your data. How does it happen? No apps are listed on my Sources section
I have an answer to my question. There is a bug in IOS8 that prevents third party applications to talk to the Health Application. Apple is trying to fix it ASAP
-
My number has been showing up as calling people while in my possession and sometimes off. How does this happen? How do I stop it?
I've tried to contact facebook support and been trying to get on live chat for hours to no avail. Please help me stop annoying people.A month ago I received a spoofed call at 6A - obviously I was not happy. Came from 000-0000000 as I recall.
Tonight I had two irate people call me minutes apart saying I called them - I was eating dinner with my wife with my phone turned off in our eye-sight.
I cannot believe that we allow spoofing software and spoof cards these days, with only a crime if someone asks for money or does some similar fraudulent activity. -
The application "video converter" says that I can retrieve my converted files through iTunes. Where and how does that happen?
I see an iPhone App called Video Converter but not an iPad app. When to do a search, it comes up with a whole bunch of apps so perhaps if you tell us exactly which app it is .....
-
Expiration of Reward points and status change from elite status how does this happen?
My rewards point have expired and my elite status has changed. How does this happen?
Good morning John30csx, and welcome to the Best Buy forum,
I can understand questioning why your account status may have been downgraded. To have retained Elite status, you would need to have spent $1500 on eligible BestBuy.com and Best Buy store purchases during the 2013 calendar year. If you did not spend at least $1500 by 12/31/2013, then your account status would have been downgraded sometime in February.
From what I can see after looking over your My Best Buy account, you had a $20 certificate that expired in September 2013. Prior to some program changes that went into effect last year, a certificate would have expired 90 days (180 days for Premier Silver/Elite Plus members) after it was originally issued. Once a certificate has officially expired, we are unable to issue a new one.
With that all being said, please feel free to send me a private message if you perhaps have any additional questions about the My Best Buy program or your account. A private message can be sent by clicking on the blue button located within my signature.
How to Keep Your Account Active
Thank you for reaching out to us!
Derek|Social Media Specialist | Best Buy® Corporate
Private Message -
I uploaded a cd to itunes...I want it on my iphone...how does this happen?
Hi iVirgo_,
To get any media from iTunes onto your iPhone, follow these instructions:
iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad
http://support.apple.com/kb/PH12313
Cheers!
- Ari -
I was trying to contact my wife in another country on a trip as I have several times since she has been away. Today we connected and then lost the signal and when I tried her again I got connected to someone in CA. How does that happen??
Edge has very clear restrictions, one being that you must have 6 months of clean payment history which you don't. Either wait until April 14, or good luck at Sprint.
I am unsure how it can be determined the payment mix up was the fault of CS, but regardless, the mix up was done. There can be any number of reasons why a payment could be missed without any fault on your part, however you are still the responsible party for the account and must live with the repercussions. -
I keep finding words on web pages (including my own) written in green and doubly underlined (described as 'Text enhance') that provide a hyperlink to "Groupon". Why does this happen and how can I stop it?
I dont want to "OPT-OUT"....i want it gone permanently!!
-
There is a new email address on my phone in the apple id password box. My password will not work. How did this happen and how can I change it back?
Of course your password shouldn't work on a different Apple ID. This can happen for many reasons, no worries, just sign out back back in using your own ID.
iOS: Changing the signed-in iTunes Store account
http://support.apple.com/kb/HT1311 -
I need to change my e-mail address in the app store, how does that work??
On apple website, seraching on support, the article HT1918 explains.
Log into your apple ID and edit your personal information, where email can be changed as well. All applications as itunes stores, apple store and icloud use this same apple ID, so be aware of this.
I hope I was helpful ! -
i brought a iphone and it worked perfectly i used it for like a year but i got a new sim so i had to get it unlocked but when i did they said the phone is blocked in the uk how does this work when i had already used it??help
I'm sorry but I don't have an answer for you... But I do have a couple of questions that may help others to help you! Was it necessary for you to get a new sim? I'm guessing yes or you would not have done that. You might want to try calling Orange and asking them to unlock it, they might ask you to connect it to your PC and use ITunes with it. Tunes will then say Congrats! Your IPhone Is UNLOCKED! I did this in the US with an OLD iPhone 3 first they asked me a serial number and other info and it worked like a charm. But the thing is Orange [or Apple] must be satisfied that the phone's contract obligations have been fulfilled. I know this is complicated and a pain in the butt, but if it's a dead phone now I would give it a shot. Oh BTW I believe here in the US it's no longer against the law to unlock a phone, apparently the law was changed, not sure about this though... Good luck!
Maybe you are looking for
-
How to stop opening next email after deleting one?
Hi, When I delete any email, next email opens automatically. I want to stop this. I want to go back to respective folder after deleting an email. Regards, Ritesh J
-
Hello! I am establishing Business Process Monitoring functionality. When I activate the monitoring I get a lot of warning "Could not change MTE customizing code 2 (MTE: <SID>\Dialog...\DBRequestTime)" <b>How critical are these warnings and how to avo
-
i bought a iphone 3gs 4 months ago had a problem with display service centre replaced me with the phone when i checked the settings of the phone in cellular usage under call time the lifetime usage was 3 days and 18 hours.what sholud be done ?
-
How to sort Notes in Mountain Lion?
In my mail notes, the topics were sorted alphabetically. In M-L notes they are sorted by date entered. How to sort the by alphabet?
-
I can not open netflix or some you tube videos
I have tried to install silverlight as instructed but nothing works (Netflix) I have other non Apple computers that are working just fine but this is the only one that has been difficult which is a shame becase it was the most expensive......I tried