C++ :: Scanning A Header File To Save Image Data

Jun 11, 2013

I'm trying to read from a header file to take the image dimensions and other variables but I don't understand how to iterate through the "key" so it saves each line.

This is what the header file will always look like:

!INTERFILE :=
!imaging modality := nucmed
!version of keys := 3.3
;
!GENERAL DATA :=

[Code].....

Ideally it would just skip the keys that aren't wanted and keep moving through the lines. Should there be a for loop for the key (and if so, how does that work with pointers?) or should this method just be scratched...

View 6 Replies


ADVERTISEMENT

C++ :: Print Custom Area Of Screen - Save As Image File

Sep 9, 2014

I am trying to automatically(periodically) print screen a custom area of the screen, save it as an image file (the image will have the same format always), and then use OCR to get the text in the image as usable string variables. Is this doable? I was looking into tesseract OCR but I find it a bit unclear.

View 10 Replies View Related

C++ :: How To Save Data To File

Sep 28, 2013

what are the codes that will save the data then it will appear in a file (.txt).

I typed the name "SpongeBob SquarePants"

SpongeBob SquarePants

View 5 Replies View Related

C Sharp :: Data Save But 2nd Record Doesn't Save

Jan 28, 2015

1st when i fill the things on form then saved in database after saving record when i want add another record it shows an error. after saving it saves new record refresh doesn't work

View 1 Replies View Related

C# :: Save And Upload Data Table From A Text File

Jul 12, 2014

I am having a lot of trouble trying to save and upload a data table from a text file ,the data table which is bound to a datagrid, creates its own columns at the formloading event, and everytime a user clicks a button row is added to the data table. With the loading i put this code which i thought would read a text file and put all the content my datatable however a exception pops up saying Duplicate Name exeption. Heres the loading piece of code :

{
string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\DG1.txt ";
if(File.Exists(filePath))
{
StreamReader reader = new StreamReader(filePath);
string line = reader.ReadLine();

[Code] ....

View 11 Replies View Related

C++ :: Retrieve The Image From URL And Save It In Array?

Sep 10, 2013

I am trying to retrieve an image from its URL as an array where each box represents the pixel value of the image.

View 3 Replies View Related

C++ :: How To Take Screenshot And Save It In Image Format

Jul 31, 2014

I want to take screen shot and save it in any image format like jpg, bmp, ppm or any other .

View 3 Replies View Related

C++ :: Capture Console Screen And Save To Image?

Jun 7, 2014

i need to capture the console screen and save to a image:)

View 3 Replies View Related

C Sharp :: How To Save Webpage As Image With Web Application

Jun 25, 2012

Is it possible to save web page as image with web application? if yes then how?.I searched and searched and searched but all examples i found were for windows application and i'm facing lot of trouble while converting it for web application.

View 1 Replies View Related

C++ :: Accessing Data Declared Private Within Header File?

Feb 10, 2015

I have a header file that declares some fields as private, I then have a class that I need to compare two of the objects' information for equality but neither of them are the calling objects. I cannot alter the header file. How would I go about comparing private data fields? I will enter a brief bit of code for clarity.

Code: // Header File
// stuff.h

class stuff
{
private:
int* arr[20];
int size;
};
bool equal (const stuff& a, const stuff& b);

[code].....

View 11 Replies View Related

C++ :: Zero Init Data Member Of Class In Header File

Jan 9, 2014

I have a small class with a static int data member. I want to zero init it. I am thinking that making a .cpp file with only one line seems too much, isn't it?

So, can I do it inside the the header file? The variable is going to enumerate how objects were created (so any alternative will do).

View 7 Replies View Related

C Sharp :: How To Access Raw Image Data In Resource File

Nov 14, 2012

I have a .png file that my console app reads and puts into a structure that is saved as a file. The png is always the same so I thought I could just add it as a resource image to a resource file so it would be included in my program and not as a separate file. When I did that, the png shows up as a "SystemDrawingBitmap". If I examine this resource in a watch I see "Base" and "Static" members. Expanding those properties does not give me anything useful such as a pointer to the raw png data and its length in bytes.

If worse comes to worse, I can always make a hex dump of the png contents and then put the hex code into a CS file using static initialization.

Surely there is some way I can access the raw data internally and read the bytes into a byte array using C#

View 2 Replies View Related

C/C++ :: How To Save Entire Web Page As Image (JPEG Format)

Apr 17, 2014

I was trying to capture entire web screen and save as .jpeg format.

So far I have done this using C# Windows Application.

Same thing I am willing to do in 'VC++ 2010 Win32. In my C++ project I have created a Toolbar with a button on IE 9 browser. And on Toolbar button click I can print current window.

But I don't know how to take a snapshot and save to specified directory in .jpeg format using VC++ 2010. I have Windows 7.

View 4 Replies View Related

Visual C++ :: Program To Display Values From Data File As Image?

Jul 29, 2014

I am writing a program to display values from a data file as an image. But I can only get a blue screen. Here is a small program resembling my code. what I have missed? I only changed OnDraw function.

Code:
void CColorDisplayView::OnDraw(CDC* pDC) {
CColorDisplayDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;
CRect rect;

[code].....

View 10 Replies View Related

Visual C++ :: Unable To Save File Using Cfiledialog Save As In MFC

Nov 5, 2013

I am trying to develop a GUI using MFC, but I am having trouble using CFiledialog to save a file. The problem is, the file is not getting saved to the folder when I use the CFiledialog. Below is the code I am using.

Code:

CString szFilter = "XNRep Files (*.xnrep)|*.xnrep||";
CString s = "xnrep";
CString t = "";
CFileDialog fileDlg(FALSE, s, t, NULL, szFilter);
if(fileDlg.DoModal() == IDOK)
{
std::ofstream file;

[Code]....

After the file dialog opens up, I enter the name of the file and select OK button. But the file does not show up in the directory I am saving to.

View 4 Replies View Related

C :: Scanning CSV File And Assigning Variable To It

Dec 26, 2013

How to scan a CSV file and assigned variable to each of the integer scanned in a csv file

an example of the csv file:
0001,40,,10

How do I scan the CSV file and assign 0001 to variable student id, the 40 to variable module 01,the 1 without input entered to module02 and 10 to module03

View 6 Replies View Related

C/C++ :: Scanning CSV File Into Array Of Structs

Mar 18, 2015

I need to scan a .csv file that contains the following info:

programming,03,60,141,01,W,2015
programming,03,60,141,30,W,2015
Algebra,03,62,102,02,S,2013
Religion,08,98,938,20,F,2014

So i made a struct:

typedef struct CourseInfo {
int courseID;
char courseName[50];
char courseCode[13];
char term[7];
} courseinfo;

Where course code is the 4 numbers after the name together and the term is the letter and year in the last two pieces of info. I got this to work:

int main() {
FILE *p;
p = fopen("input.csv", "r+");
if(p == NULL) {
puts("The file could not be opened");

[Code] ......

But lets say i dont know how many lines i have in my file and i want to count them and then use that size for my array so i tried this by:

int main() {
FILE *p;
int lines = 1;
char ch;
p = fopen("input.csv", "r+");
if(p == NULL) {

[Code] .....

But the second program is not working for unknown reasons. I do not get any errors but its not scanning the info because when i print the info later on it prints out random symbols.

View 11 Replies View Related

C :: Scanning A File With Words And Int / Float Numbers

Dec 1, 2013

scanning a file with both words and INT's/Float numbers. This is the file data here.

15 25 200
3 10
17.99 22.99 109.99
100 2 4
5.99 99.99 20.00 49.99
10 10 10 10 10 10 10 10 10 10
3.99 5.99 7.99 8.00 5.00 5.00 5.00 6.00 7.00 9.99

[Code]...

What I'm focused on is reading in the first three numbers which I already have with fscanf and then reading in BUY TICKET with the digit afterwards. My problem is that I don't know how to reach that part of the file without scanning in something I don't want to. Also, how would I scan the number after scanning BUY TICKET? Would it be something like using %s and %d right afterwards?

View 4 Replies View Related

C :: Scanning Numbers From TXT File Into A File

Mar 6, 2015

I'm new to programming and I have a question about scanning numbers from a .txt file into a .c file. I have an array that has 50 integers and I want to read in 50 numbers from a .txt file. What would I type in on the command line to get the array to read in the .txt numbers?

View 1 Replies View Related

C# :: Save Image In Layers And Then Load Layers Separately

Oct 4, 2013

I am programming an application in c# that allows the user to edit images. The user can use a Pen to write on the image, and the user can also use a highlighter (a big semi-transparent Pen) to highlight what they've written. I need the user to be able to erase only the highlighting without erasing the pen drawings.

My solution was to have the user draw on one graphics window when the pen is selected and draw on the other graphics window when the highlighter is selected. I will then enable the eraser on either graphics window depending on what the user wants to erase.

My program will let the user save the image and then load it into the program again for later editing. When I save the image, I have to compress the layers (different graphics windows) into one bitmap. When I load the bitmap back into my application, I lose my layers and cannot erase just the highlighting without also erasing the pen as well.

How can I save an image file with layers, and then recover the layers when my program starts up again?

I am not opposed to saving two images - one with the pen graphics window and the other with the highlighting. If I do that, how can I merge the two images into one layer when I load the images back into my program?

View 2 Replies View Related

C# :: Add / Save Data In Database

Apr 8, 2015

I had assign to do a project using c# window form.Now I am doing a smart part of coding which is let the data in textbox and using keypress function with a enter,the data will save in database and show on datagridview.I had searching how to do it online but all of them using mysql or sqlcommand something to do it! But my project is using the code that already done and can access without mysql or sql coding... Using this code to connect and show in datagridview...

using (TMPB_attn_DAL dalObj = new TMPB_attn_DAL())
{
dataGridView1.DataSource = dalObj.GetRecords().Cast<TMPB_attn>().ToList();
dataGridView1.Refresh();
}

This is the function code for me to add data inside database,it can run but just still cant save.

private void txt_proximity_KeyPress(object sender, KeyPressEventArgs e) {
if (e.KeyChar == (char)13) {
if (BusinessLogicLayer.TMS_GET_PROXIMITY_VALID_TO_USE(txt_proximity.Text) == true) {
TMPB_attn row_tmpb_attn = new TMPB_attn();

[code] ....

View 3 Replies View Related

C++ :: Program Save Input Data?

Feb 14, 2014

Can any C++ or C program save input data?

View 3 Replies View Related

C :: Manually Save Data In Individual Bits

Mar 18, 2013

I'm a C beginner. I have questions, let say if I have a structure of message containing of Id, Length, and 3 bytes of data, and I want to manually saved in individual bits of data, how can I do that? I confused on how to use typedef struct and union. Below is the sample code:

typedef struct {
uint8_t Id;
uint8_t Length;
uint8_t DataField[3];
}AA;

[Code] .....

By the way, the DataField is declared as above. It's not necessary for a data to be 24 bits. It can be bit 0 - bit 8, it can be bit 10 - bit 15 and so on. So, for each case, I want to ignore the other bits.

View 5 Replies View Related

C++ :: How To Read Data Of Particular Student And Save It After Modifying

Jun 21, 2014

I have to read a particular student data from file using his Roll no and modify it and then save it to file again

This is the File
24 salman 98 97 96 95 94 A ;
21 faizan 88 87 86 83 85 B ;
35 Gohar 99 98 97 96 90 B ;
45 sibghat 91 92 78 85 88 C ;
009 john 89 87 91 78 95 C ;

how can i read data of roll no 35 and modify it and save it again to the file

this is my program

int r = 0 ;
while ( ar[j]!="0" ) {
//cout << "Salman majid is
" ;
if ( ar[j]==k ) {
r = j ;
getdata() ;

[Code] .....

View 2 Replies View Related

C :: Save Data To Arrays Defined In Main Using Their Addresses

Dec 30, 2013

so i have two classes ( main and another one ask ) in main i have defined 3 arrays (char drivers[250] ,offences[250] , owners[250]) and also included their pointers ( char *drivers_ptr,*offences_ptr,8owners_ptr)my problem is that i need to set values (actually 1 string of 250 chars to each of these arrays BUT from the class ask without making these arrays global -as this is prohibited by my university exercise !- )

so my question is how will i manage to save data to the arrays that i have defined in main using their addresses(through the pointers of each one that i have passed to the ask class) from the ask class ?

View 4 Replies View Related

C :: Save Data From Global Variable Into Linked List

Jul 6, 2013

I'm trying to run so called student-administration program.I got functions that can read and write student data, but the one saving the data from about 30 students has some problem that I can't figure. (warning: I'm quite new to C programming)so this is the code:..I guess I can't use global variables as function arguments?

Code:

//global variables
static char ReturnName[31];
static char ReturnFirstName[31];
static float ReturnAverage;
}

[code]....

incompatible types when assigning to type 'char[31]' from type 'int'

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved