|
Read my previous reply to you again and provide all the details I asked for.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi
GDI + implements many class which include Graphics, Image, and Bitmap.
The Bitmap (Inherited from Image) only implements a function call "RotateFlip" which can be used rotated Bitmap by only "90, 180, 270, 360..". The Bitmap can not be rotated by any angle.
I post a message several days ago. David suggested me to use "Graphics" and "Grphics.DrawImage". But I found out that "Graphics" is only used to display the image.
Can I rotated a Bitmap not on screen but the Bitmap itself using GDI+?
Best regard,
|
|
|
|
|
You can use a Graphics to draw into a Bitmap, then save that Bitmap to a file.
--Mike--
Dunder-Mifflin, this is Pam.
|
|
|
|
|
Hi Mike
Please tell me how to draw into a bitmap? I tried following code:
Graphics g(hdc);
Image i(L"HelloWorld.bmp");
g.DrawImage(&i,0,1024);
g.TranslateTransform(100.0f, 50.0f);
g.RotateTransform(45.0f);
g.DrawImage(i,0,0);
CLSID jpgClsid;
GetEncoderClsid(L"image/jpeg", &jpgClsid);
i.Save(pIStream1, &jpgClsid);
I can not get the Bitmap rotated.
I don't know the operation to show on screen. I just need the rotated the bitmap.
Please help me.
modified on Monday, August 3, 2009 4:22 PM
|
|
|
|
|
Graphics has a constructor that takes an Image*. Construct a Bitmap, use a Graphics object to draw into it, then save that Bitmap to a file with Image::Save().
--Mike--
Dunder-Mifflin, this is Pam.
|
|
|
|
|
Dear Mike
Thank you so much, I finally figure out how to let it work now. You are great.
Best regards,
|
|
|
|
|
Hi Mike
I have another question for you. Can I save a bitmap as 8 bit or 16 bit instead of GDI default 24 bit?
Best regards,
|
|
|
|
|
I haven't tried this, but when you create a Bitmap, you can give it a pixel format. See if using different formats affects how the file is saved.
--Mike--
Dunder-Mifflin, this is Pam.
|
|
|
|
|
I recently switched from Bloodshed to Visual in order to use FLTK, but I'm having trouble with just compiling/running a simple file. I know that a file has to be in a project for it to be compiled (what is the purpose of this by the way?), but even after I figured that out I'm still having issues. The errors given aren't very clear either :/
Something as simple as this doesn't compile.
#include "std_lib_facilities.h"
int main()
{
cout << "This creates an error." << endl;
keep_window_open();
}
1>. \Debug\Exercises.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
My guess would be that this is because it doesn't recognize the std_lib_facilities header, even though it's in my project folder. How can I get the IDE to recognize the header?
|
|
|
|
|
Does this help?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Well it doesn't generate the error message anymore, but when I try to compile it just says 1 up to date rather than 1 succeeded. When I try to run it I get a message saying that it can't find the file path specified.
|
|
|
|
|
BSO_VC wrote: When I try to run it I get a message saying that it can't find the file path specified.
Ok, and?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
And what? What information do you need.
|
|
|
|
|
BSO_VC wrote: What information do you need.
Small details like where does the message come from, and what file is it referring to?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Okay if I try to run it, the "cannot find file path specified" is a pop up message.
The file path is C:\Users\Alex\Documents\Visual Studio 2008\Projects\Exercises\Exercises\Debug\Exercises.exe
Now that I look at it the file path isn't correct.
I'm learning from a book, and since I realized that in Visual Studio you can't compile a file without it being in a project, I figured I would just put all of my files into one project.
Basically all I did was create an empty console application project called exercises, and copy and pasted all of my files into it.
Obviously I'm doing something wrong. (Seems odd that they wouldn't just implement a simple compile and run for a single file.) I want to just delete the project and start from scratch to set up everything correctly.
If you need any more info let me know, otherwise I don't know what to do.
|
|
|
|
|
BSO_VC wrote: ...I realized that in Visual Studio you can't compile a file without it being in a project...
Sure you can, just don't confuse the IDE with the actual compiler. Here are the compiler options.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I decided to just switch back to Bloodshed. Found out they have a package manager to manage the FLTK.
|
|
|
|
|
I am emulating mobile in windows platform.. so I have two text box emulating 2 lines of LCD of mobile.
Max number of character that i can store in memory can be 50 per line, but the only 20 characters can be displayed in LCD(text box) at any point of time.
I have to take of scrolling left, scrolling right, including insertion and deletion of character in LCD(text box)
I know i have to take of Cursor position, and possibly have MasterBuffer which will contain the 50 characters and TemporaryBuffer which shall contain 20 characters to display.
I can work out a logic to take care of insertion, deletion etc.
But before i start doing my own logic, i wish to know is there any algorithm defined for it already as or any library available or any kind of class.. or code snippet.. i dont want to start from ground zero if it is already something is available.. as i felt text editing in mobile is common..
Let me know if you want more info..
Advance thanks on your reply!
|
|
|
|
|
hi all,
i am making my unicode supporting one. i have to read content from the notepad file..
i am using Read(cstring x,uint ncount) function..(MFC function..)
i have chinese content in my file now.. if i try to read the file, the max. number of bytesread is 1268 only.. y is it so??
i tested with various files too.. but it reading upto 1268 characters... can anyone shed some light on this one??
whereas , i have a text file which contains only english characters but saved in unicode format was read successfully.. the file size was 142,266 bytes and it read completely..
its surprising me that its reading only 1268 bytes when i have chinese characters in my file..
pls tell me the approach how to solve this issue..
Thanks,
Rakesh.
|
|
|
|
|
Rakesh5 wrote: i am using Read(cstring x,uint ncount) function..(MFC function..)
Post the exact code, please.
Rakesh5 wrote: if i try to read the file, the max. number of bytesread is 1268 only
Out of how many?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have this strange problem.. I made a program in VC++ which makes LAN(Language) file from database.. I had this "Simplified Chinese" database and i made some 10-12 LAN files from it.. Now when i try to read and write LAN files entries in my project, it shows mixture of "???? and some right data"... So i again did the read/write operation using Unicode, and all went well...
Now the project is real big and i was only making LAN file from database, Other application which are uncountable uses my LAN file to read and write data into the project window and they aren't using Unicode to read or write, so obviously the output comes as mixture of "???? and some right data"...
So it's vivid that if i change all the application to read/write using Unicode only then it will show right data, But problem is that i can't change anything as it was written a long time back and a lot depend on that coding... So is there any way i can still do this thing.
P.S
No problem is coming when i use "Chinese(Traditional), Portuguese, Italian, German etc" databases... I guess some of simplified Chinese character are not detected if we don't use Unicode method..
Thanks all
|
|
|
|
|
No one
|
|
|
|
|
i am usging msdn in visual studio 2008.
but help section font is very small.
so how can i change font size?
http://msdn.microsoft.com/en-us/library/aa911376.aspx
but i can't find HKEY_CURRENT_USER\SOFTWARE\Microsoft\HELP\ZoomSetting .
so is there other way to change font size?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
No need to change any registry setting.
You can find it in the menu.
View -> Text Size -> Largest
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
have a nice day^^
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
modified on Monday, August 3, 2009 11:20 AM
|
|
|
|