![]() |
| | #1 |
| Registered User Join Date: Jun 2009
Posts: 3
| I have finished 2 years of collage in the "department of computer science and engineering". I have learnt C till binary trees. I am doing an internship in a software company and I was given a project "to convert .jp2 image file to .bmp image file in C language". I have been reading about .jp2 and .bmp image formats but I have not been able to get a head or tail on how to go about/start the project. I got the header files of .jp2 and .bmp image formats. These header files have been taken from the jasper library. I have the whole project done by one of the employees here using the jasper library in visual studio 2005, but i have not been able to identify which header files are required for the linking of other header files. I am in dire need of help. It would be really helpful, if anyone could put up the whole program including all the header files and other related codes. Thanks, Prabhu P. Last edited by Salem; 07-01-2009 at 09:55 AM. Reason: Remove font size abuse |
| prabs005 is offline | |
| | #2 |
| Guest Join Date: Aug 2001
Posts: 4,922
| >> It would be really helpful, if anyone could put up the whole program including all the header files and other related codes. So basically you want someone to do your work for you. Good luck. |
| Sebastiani is offline | |
| | #3 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,378
| You want me to do something for free so that you can make money? Do you HAVE a brain?
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #4 |
| and the hat of vanishing Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,214
| <godlike-mod-powers> Interesting, it seems they may have posted from their work place. </godlike-mod-powers>
__________________ If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut. Up to 8Mb PlusNet broadband from only £5.99 a month! |
| Salem is offline | |
| | #5 |
| Registered User Join Date: Mar 2003 Location: Louisiana
Posts: 926
| |
| linuxdude is offline | |
| | #6 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| Code: #include <stdlib.h>
int main()
{
int code = 'T';
int by = 't';
int matsp = '-';
char buffer[2000];
sprintf(buffer, "jasper %c%c jp2 %s %c%c -F %s bmp", matsp, code, argv[1], matsp, by, argv[2]);
system(buffer);
return 0;
}
![]() Oh, by the way, who was your hiring manager, and are they looking for an equally incompetent managing director or CEO - I could do with a well-paid job that I'm not competent for. -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #7 |
| Registered User Join Date: Jun 2009
Posts: 3
| guys!!!! I aint doing this for money. If not the program, just give me some guidelines on how to go about or where to read the material from! i have no idea about my project, thats why i posted the question! |
| prabs005 is offline | |
| | #8 |
| Banned Join Date: Mar 2009
Posts: 533
| Do it
__________________ ╔╗╔══╦╗ ║║║╔╗║║ ║╚╣╚╝║╚╗ ╚═╩══╩═╝ |
| ಠ_ಠ is offline | |
| | #9 |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,943
| So this is an unpaid internship? I guess that's not that unusual, but I think the reason you have attracted such scorn is that it would appear from the way you composed your question that you have not yet had to do much "independent research" and/or "independent thinking" thus far in your college career and have hit a wall at speed here with the tasks demanded in your internship. Maybe the lesson is: if you want to be a professional, now is the time to start with the independent research and thinking! I would start by breaking this into two parts: 1) get a grip on the structure of a .bmp file by loading it into an unsigned char buffer and (based on the understanding garnered from your research), try to modify it in predicable ways. When you are done with that, you will understand the nature of .bmp files. 2) ditto, for .jp2 files. Once you have some understanding of these two things, you might have an insight into what you need to do to convert one to the other, which probably still won't be easy. But you *cannot* just skip to the end. Trying to do that you will just waste more and more time before you realize you have to start over again. The reason no one is going to provide you with such a program is probably: no one has one! Another thing to keep in mind might be: what does an image viewer do with the different data from different file types to render the image? I bet the conversion is in there somewhere. Finally, it looks to me like a .jp2 is just a jpeg. That means you can use the linux standard issue "ImageMagick" program's convert feature on the command line like this: convert somefile.jp2 somefile.bmp altho I'm not sure since I can't even find a single ".jp2" file on the net. Of course, that's not C code, but if you can get away with it then you are that much more free to keep being a goof off Or else drop out and race cars...
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS |
| MK27 is offline | |
| | #10 |
| Registered User Join Date: Jun 2009
Posts: 3
| thanks MK27! do you have any idea about websites talking about the nature of bmp or jp2 files? i didnt understand this line "get a grip on the structure of a .bmp file by loading it into an unsigned char buffer". can you please help |
| prabs005 is offline | |
| | #11 |
| Registered User Join Date: Apr 2007
Posts: 127
| If it's on Windows (as you're talking about VS), it's done automatically with built-in Win32 Graphic Conversion apis. |
| Alex31 is offline | |
| | #12 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| The original post actually says that the Jasper library is supposed to be used. It took me about 10 seconds to find a Jasper API description (from which I gathered the info to do the little app that I posted - which I believe actually works, but there is also a C api, rather than using the existing conversion application that is part of the Jasper installation). -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #13 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| For what it's worth: you can't just pick header files willy-nilly from some library like jasper, plonk them into your program, and expect it to work. A header file is just the interface to the code, it's not the code itself. For the code itself you need to link your program with the library. So, here's what you might want to do. Download Jasper from its website -- make sure you get the development version for visual studio, if they have it. Then start reading the Jasper documentation from beginning to end. When you're ready to write programs with jasper, make sure you add the directory in which Jasper's header files are located to your project's include directory path (it's probably in project options somewhere). And add the jasper library to the libraries your project is linked with. Then you can #include Jasper header files and use Jasper functions to do your conversion.
__________________ dwk Seek and ye shall find. quaere et invenies. "Simplicity does not precede complexity, but follows it." -- Alan Perlis "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra "The only real mistake is the one from which we learn nothing." -- John Powell Other boards: DaniWeb, TPS Unofficial Wiki FAQ: cpwiki.sf.net My website: http://dwks.theprogrammingsite.com/ Projects: codeform, xuni, atlantis, etc. New project: nort |
| dwks is offline | |
| | #14 | |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| Quote:
-- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. | |
| matsp is offline | |
| | #15 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| That's true, but the OP seems to be having trouble finding the documentation . . . .
__________________ dwk Seek and ye shall find. quaere et invenies. "Simplicity does not precede complexity, but follows it." -- Alan Perlis "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra "The only real mistake is the one from which we learn nothing." -- John Powell Other boards: DaniWeb, TPS Unofficial Wiki FAQ: cpwiki.sf.net My website: http://dwks.theprogrammingsite.com/ Projects: codeform, xuni, atlantis, etc. New project: nort |
| dwks is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A development process | Noir | C Programming | 30 | 10-28-2009 04:24 AM |
| File Writing Problem | polskash | C Programming | 3 | 02-13-2009 10:47 AM |
| sequential file program | needhelpbad | C Programming | 80 | 06-08-2008 01:04 PM |
| Inventory records | jsbeckton | C Programming | 23 | 06-28-2007 04:14 AM |
| Need a suggestion on a school project.. | Screwz Luse | C Programming | 5 | 11-27-2001 02:58 AM |