|
Its not a graphic question but you can load your image with LoadImage and then you need to use of SetBitmap.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I have checked all the blogs and even in codeproject, a dll is used but it is commercial one, i want open source or freeware, is there any conversion logic or dll(not commmercial).
Please help me.
Thanks in advance
|
|
|
|
|
For goodness sake Google it. There are thousands of hits for 'pdf conversion' not least of which is ITextSharp.
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
Hi all,
I want to draw a line with patter "----- -- "( 1111100011000 ). The problem is that, the glLineStipple() function accepts pattern in short variable(16 bits). But in my case there is only 13 bits.
Is there any method to draw a line with the above pattern?
Thanks
|
|
|
|
|
Not directly, but you could play with the bit pattern and the scale to make your pattern fit, using the following equation,
pattern bit ( counter / factor ) mod 16
|
|
|
|
|
Thanks.
I saw this equation in MSDN. But didnt understand the equation correctly. Could you please elobarate it? Does this eqation mean
pattern bit * ( counter / factor ) mod 16
Also what is this counter? How can I change its value?
Thanks
|
|
|
|
|
The counter is internal to the raster unit, it is reset to zero on a glBegin and incremented for every antialiased pixel box until glEnd is called.
Factor defines how many pixel blocks are printed for each single bit, so lets say you wanted to print 110011, what you could also do is 101 with factor = 2.
So basically, you may not get the exact pattern you want, but by basing the factor to the smallest consecutive bits you can have a bit more freedom.
|
|
|
|
|
Hi all,
I have written a program that draws graphics to a picturebox control with GDI+ graphics. I want to be able to save the graphics as a jpg file. What I have done is create a temporary bitmap object and using the pictureboxs DrawToBitmap method copying the picturebox to the bitmap.
Then I have used the bitmap objects Save method to write the jpg file. When I view the the jpg all I see is black with none of the graphics that are on the picturebox control.
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim bmpMap As New Bitmap(924, 722)
Dim Rect As Rectangle = imgMap.DisplayRectangle
imgMap.DrawToBitmap(bmpMap, Rect)
bmpMap.Save("C:\STARS!\Map.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
End Sub
This code compiles without errors, but the result is not what I expected. Can anyone help please?
Thanks in advance
Rob.
|
|
|
|
|
Hi
I am fresh to 3d programmng and currently I have no knowledge about 3d programming libraries.
I have an academic project which has to be completed in 3 months.
An individual has offered me a 3d project. Project requirment is as follows. A webcam will capture a person face which is rotated from left to right, displaying the entire front side of a person. A 3d image is to be created from these data.
Is it feasible to get a clear 3d picture of the face?? If so , will it be feasible to finish the project in 3 months for academic students?
Also can you pls suggest me the best suited library? wpf, opengl or directx or some other??
What else aspects should I know to do the project??
thanks in advance
Fadi
|
|
|
|
|
That is a hell of an undertaking for someone without ANY 3D knowledge as of now. I would suggest not doing that as your final project. What I would do however is take the aspects that you are good at, combine them, then take a few small things that you are not so good at, and throw them in there.
That would be a very cool application however.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
is there any one can help with codes or articals or tutorials..
i am reaaly so confused ,,
i don't know how can i work with pixels and designe my application ..?
please need ur help ..
|
|
|
|
|
Hey u can use Aforge.Net which gives u all options to work on a picture.Give reference to dlls related to Aforge. You can get info on Aforge in this site only. In a project called "Image Processing Library" u will get it.
Check it , i am sure that it will help u.
Cheers
Gtag.
|
|
|
|
|
SDK said that the color keys are specified in the raw pixel format. But I don't know how to set this value for YUY2 16bits. For YUY2 16bits, the byte ordering is: Y0, (U0 + U1)/2, Y1, (V0 + V1)/2, ...... If I want to use the pixel 0 as the color key, how to set the dwColorSpaceLowValue of struct DDCOLORKEY?
I try many times, but it can't work. Who can help me? Thanks.
|
|
|
|
|
The byte ordering should be Y0, U0, Y1, V0, Y2, U1, Y3, V1...
|
|
|
|
|
Hi all,
I want to calculate the homography assuming i have 4 points in the original image and 4 points in the resulted image.
x' = xH where x' is the points in the resulted image, H is the homography and x is points in the original image. Please help! Thanks!
|
|
|
|
|
this.webBrowser1.Document.Body.InnerHtml +=@"<br/>"
concatenates <BR> to this.webBrowser1.Document.Body.InnerHtml
I am pretty confused what is happening is it a bug or what?
|
|
|
|
|
Hi, Do You know how can the click mouse event be managed ?
In particular I'd like to know if it's possible receive, when I keep pressed the left mouse button, a sequential serie of mouse click events.
I'm interested into this fact because I'd like to implement scrolling in a custom control letting the possibility to scroll keeping pressed the left button with no necessity to click continuosly the mouse button.
Thanks.
Stefano.
|
|
|
|
|
Hello folks,
i'm searching for a class or any sample code to organize a graph (map or network).
I try to explain better, i just want to display a graph in a fine way, clear and well spaced.
Thanks in advance
Program your life ^^
modified on Wednesday, January 7, 2009 3:39 PM
|
|
|
|
|
Lookup "simulated annealing" - it's a good algorithm for laying out all kinds of data, from map labels to graphs.
Cheers,
Drew.
|
|
|
|
|
|
There 2 32bpp bitmaps with some images:
bitmap1
bitmap2
and graphics object g1 created from bitmap1
I set individualy alpha values in bitmap2 using LockBits:
Gdiplus::BitmapData bitmapData;
Gdiplus::Status s = pBitmap->LockBits(&Gdiplus::Rect(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()),
Gdiplus::ImageLockModeWrite | Gdiplus::ImageLockModeRead,
PixelFormat32bppRGB, &bitmapData);
if (s == Gdiplus::Ok) {
unsigned int* pPixels = (unsigned int *)bitmapData.Scan0;
for (unsigned int i = 0; i < bitmapData.Height; i++) {
for (unsigned int j = 0; j < bitmapData.Width; j++) {
if (mask(i, j) > 0)
pPixels[j] &= 0xFFFFFFFF;
else
pPixels[j] = 0x00FFFFFF;
}
pPixels += bitmapData.Stride / 4;
}
pBitmap->UnlockBits(&bitmapData);
}
And then draw it on bitmap1 using g1. But the alpha blending does not happen?
chesnokov
|
|
|
|
|
Chesnokov Yuriy wrote: Gdiplus::Status s = pBitmap->LockBits(&Gdiplus::Rect(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()),
Gdiplus::ImageLockModeWrite | Gdiplus::ImageLockModeRead,
PixelFormat32bppRGB, &bitmapData);
Shouldn't that be Format32bppArgb ?
The pBitmap bitmap must be Format32bppArgb as well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
you're the MVP.
Muchos gracias!
I do not believe how can I omited that ARG in this call? They were all ARGB created and cloned, but that single LockBits somehow avoided ARGB. Ohhh
Чесноков
|
|
|
|
|
Hi! I'm using Visual C++ 2005 Express Edition and I am trying to create an application that uses DirectSound. I found on DirectSound Documentation how to initiate it, but I still have some problems. When I initiate last member of DSBUFFERDESC (the struct that describes the characteristics of a new buffer), i get this error:
1>main.obj : error LNK2019: unresolved external symbol _GUID_NULL
referenced in function "void __cdecl InitDirectSound(struct HWND__ *)" (?InitDirectSound@@YAXPAUHWND__@@@Z)
Here is the code, where "GUID_NULL" (which is defined in dsound.h) appears:
DSBUFFERDESC pcDSPrimaryBufferDesc,
pcDSPrimaryBufferDesc.guid3DAlgorithm=GUID_NULL;
On my project Propetries>>Configuration Propetries>>Linker>>Input>>ADDITIONAL DEPENDENCIES I added dsound.lib, but on DirectX Documentation it says that some DirectSound functions use Dsound3d.dll as import library. Where should I add it? what did I missed?
Thank you in advance!
|
|
|
|
|
Member 3796009 wrote: On my project Propetries>>Configuration Propetries>>Linker>>Input>>ADDITIONAL DEPENDENCIES I added dsound.lib
Try adding Dxguid.lib as well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|