Search found 15 matches

by Garfield9992003
Tue May 17, 2005 8:03 pm
Forum: Coding Questions
Topic: Print Image (or whats wrong here?)
Replies: 7
Views: 1987

Damn, you´re right!

The golden word is StretchDIBits....
I´ve got the image as raw-array and converted it to an ImageID for other reasons. So, i´ve changed some code now, and it work!

Many thanks. I´ve spend hours for this...

*kiss* *g*

Frank
by Garfield9992003
Tue May 17, 2005 6:27 pm
Forum: Coding Questions
Topic: Print Image (or whats wrong here?)
Replies: 7
Views: 1987

This sample is better than mine :)
But it does always a black picture, because there isn´t a relation to imgDC.

I´ve tried with a 2nd Setobject to put the useimage-handle to hImg... nothing....

I´m getting confused too with handles, DCs, pointers, bitmaps.... :shock:
by Garfield9992003
Tue May 17, 2005 2:57 pm
Forum: Coding Questions
Topic: Alpha chanel... :(
Replies: 9
Views: 2395

Something like this for alpha-channel?
VB-Example Codes, easy to translate to Purebasic.

http://www.vbarchiv.net/archiv/tipp_442.html
http://www.vbarchiv.net/archiv/tipp_770.html
by Garfield9992003
Tue May 17, 2005 2:49 pm
Forum: Coding Questions
Topic: Help needed
Replies: 4
Views: 1409

Like this?

; MessageRequester Demo
; 20. Jan. 2003 by Ingo Turski

If OpenWindow(0, 235, 10, 550, 290, #PB_Window_MinimizeGadget | #PB_Window_TitleBar, "MessageRequester-Demo")

If CreateGadgetList(WindowID())

Button=ButtonGadget(0,10,10,150,24,"#MB_ICONSTOP")
Button=ButtonGadget(1,200,10 ...
by Garfield9992003
Tue May 17, 2005 2:09 pm
Forum: Coding Questions
Topic: Print Image (or whats wrong here?)
Replies: 7
Views: 1987

Thanks! I took the wrong constant in GetDeviceCaps...
And i´ve fixed the Scalefactor now.

And now, i know the reason:
When i use the first block (see code) with saveimage and loadimage_, then it works. - But i want to use the second (remarked) block with useimage.

Do you have an idea?!

Regards ...
by Garfield9992003
Mon May 16, 2005 11:53 pm
Forum: Coding Questions
Topic: Color conversation & JPG
Replies: 11
Views: 2981

Thanks @ all

I´ll take a look at the imgSource-dll. It sounds good. It´s relly important that i could save the images in *small* files.

@Sparkie - i´ve converted the images from color to bw/gray with PokeB and PeekB. (First allocate memorysize) Thats fast. I could put code here, if u want ...
by Garfield9992003
Mon May 16, 2005 11:20 pm
Forum: Coding Questions
Topic: Print Image (or whats wrong here?)
Replies: 7
Views: 1987

Print Image (or whats wrong here?)

Hello.

I´ve posted my problem in german forum too. But no answer.
Now, i hope here to get help.

My problem:
I´ve got a form with an image and some printer-settings.
The image can be resized to fit in page. But nothing occurs - my printed pages (Fineprint and epson-preview) keep blank.

Why?

Here ...
by Garfield9992003
Fri May 13, 2005 12:50 pm
Forum: Coding Questions
Topic: Color conversation & JPG
Replies: 11
Views: 2981

Color conversation & JPG

Hi.

I´ve got 2 problems:

1.) How can i convert a 24-bit color bitmap (i´ve got it in a buffer and in a file) to 8-bit grayscale and 1-bit black/white image? Is there a fast solution? (perhaps assembler?)
I dont want to convert an 24-bit color image to a 24bit grayscale image :)

2.) How can I save ...
by Garfield9992003
Thu May 12, 2005 1:04 am
Forum: Coding Questions
Topic: Simple Bitblt_
Replies: 6
Views: 1744

Wow, it work great!

Thanks you a lot!


Frank
by Garfield9992003
Wed May 11, 2005 10:54 pm
Forum: Coding Questions
Topic: Simple Bitblt_
Replies: 6
Views: 1744

Damn, i thought it :(

And how could i receive a dc from an image?

I had no results with GetDC.

Is there another way?


Thx.

Frank
by Garfield9992003
Wed May 11, 2005 10:19 pm
Forum: Coding Questions
Topic: Simple Bitblt_
Replies: 6
Views: 1744

Thanx a lot, it works fine!

But now, i´ve my second problem with image-handles :(

I want to copy 2 images into a new one:

Images 0 and 1 are given. How can i retrieve a handle on it?
Image 2 keeps black :(

What´s wrong?

id1=UseImage(0) ;image 200x200 pixel stored in image #1
id2=UseImage(1 ...
by Garfield9992003
Wed May 11, 2005 7:05 pm
Forum: Coding Questions
Topic: Simple Bitblt_
Replies: 6
Views: 1744

Simple Bitblt_

Why are the 2 jpg´s from the code different?
They should be identical.
Its only a sample code from my project.

hBMP.l=CreateImage(0, 200, 400)
dcv.l=StartDrawing(ImageOutput())
Box(50,50,100,300,RGB(255,255,255))
StopDrawing()

MemDC.l = CreateCompatibleDC_(dcv)
BitmapID.l = CreateImage ...
by Garfield9992003
Thu Apr 28, 2005 10:39 pm
Forum: Coding Questions
Topic: Titlebar and system-icons
Replies: 1
Views: 948

Titlebar and system-icons

Hi.

How can I disable the systemmenu and all icons - except the minimize-button from titlebar in a window?

My program run in systray and the user should only minimize the window.

Frank
by Garfield9992003
Wed Apr 27, 2005 2:37 am
Forum: Coding Questions
Topic: Color-Animated Box
Replies: 0
Views: 776

Color-Animated Box

Hello everyone.

I´ve got a problem and cant solve it :(

I draw a normal box and an outlined box on a form.
Later, the normal box should contain a bitmap.
Then the user should mask a piece in it with the outline-box.
The mark (with mouse events) isn´t the problem.
The problem is, that the outline ...
by Garfield9992003
Tue Apr 26, 2005 8:18 am
Forum: Coding Questions
Topic: C-Struct in Purebasic
Replies: 1
Views: 1118

C-Struct in Purebasic

Hi everyone.

How do i implement the following C-header struct in Purebasic?
I´ve tried with "structureunion" but this doesnt work.

Frank

typedef struct tagTest
{
struct
{
DWORD T1 : 1;
DWORD T2 : 1;
DWORD T3 : 1;
DWORD T4 : 2;
DWORD T5 : 1;
DWORD T6 : 1;
DWORD T7 : 0;
DWORD ...