English
Forum

GDI+

 
- Page 1 -



Georg
Hovenbitzer
Hello together,

me erdrückt straight a gigantic Wissenslücke what about me hope your can me help on.
target is it, one Image To loading, it to a Thumbnail To verkleiner and then in a data base to take off.
my trouble is now the part between Thumbnail and Database and there the, How I a Speicheradresse / aray the Bildes and which Size come:
as Presentation have I the geile GDI+ demonstration of Andreas taken.
 $H \windows.ph
 $H \includes\Functions_GDIPLUS.ph
 $H \includes\GDIP_Imageging.ph
 $I \includes\GDIP_Helper.inc
Declare gdiplusToken&,ImageObject&,ImageWidth&,ImageHeight&,GraphicObject&
Declare hPic&
Declare imgThumb&
Declare lngImage&
Declare hBitmap&
Window 0,0-1024,786
Cls ~GetSysColor(~COLOR_3DFACE)
gdiplusToken& = InitGDIPlus()
hPic& = @Create(hPic,-1,Image.jpg)
~GdipCreateBitmapFromHBITMAP(hPic&,0,@Addr(lngImage&))
~GdipGetImageThumbnail(lngImage&,92,69,@Addr(imgThumb&),0,0)
~GdipCreateHBITMAPFromBitmap(imgThumb&,@Addr(hBitmap&))
DrawPic hBitmap&,50,50;0
here bräuchte I now something, what me a address or aray and which Size determined !!!
WaitInput
DeleteObject hPic&
DeleteObject hBitmap&
~GdipDisposeImage(imgThumb&)
~GdipDisposeImage(lngImage&)
ExitGDIPlus(gdiplusToken&)
End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/02/09  
 



 
- Page 2 -


wished time of of my Bmp-File(64x64Pixel) The RGB-values read. the Image has 3 different waagerechte
Farbstreifen(RGB). it come utterly incorrect values 31 0 31, 227 0 227 etc.

though pure RGB-values come should 255 0 0, 0 255 0, 0 0 255 zb.
window 30,30-500,500
 $H windows.ph
declare bmi#,b#
declare Pic$,Handle&,Neu&,wert&,hwin&
Window 20,20-200,200
hWin& = Create(Window, %hWnd, Test, 250, 20, 650,500)
Pic$=Test.bmp
Handle&=create(hPic,-1,Pic$)
struct bmpHEADER=Size&,Width&,Height&,Planes%,BitCount%,Compression&,SizeImage&,X#(24)
dim bmi#,bmpHEADER
bmi#.Size&=sizeof(bmi#)------------------Size of BITMAPINFOHEADER
~GetDIBits(%hdc,Handle&,0,0,0,bmi#,0)--Dummy-appeal, circa bmpHeader To fill (Return: 1=OK)
print sizeof(bmi#)
dim b#,bmi#.SizeImage&-----------------area for Bildinformationen (Pixel) provide
~GetDIBits(%hdc,Handle&,0,bmi#.Height&,b#,bmi#,0)--Eigendliche Bilddaten from lever detect
Neu&=~CreateDIBitmap(%hdc,bmi#,4,b#,bmi#,0)------new DIB with modified colours produce
startpaint hwin&
drawpic Neu&,10,10;0
endpaint
wert&=bmi#.SizeImage&

whileloop 0,wert&,4

    print byte(b#,&loop),byte(b#,&loop+1),byte(b#,&loop+2)
    sleep 10

endwhile

 
03/05/09  
 




Jörg
Sellmeyer
have Thou The Bitmap already with a external Program screen? If I einfarbige Bitmaps einsetze, go The values correctly outputted.
here's my Bitmap


15 kB
Hochgeladen:03/05/09
Downloadcounter172
Download
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03/05/09  
 



The values have I by me screen, having any the value 255 in R, G and B.
with 2 Grafikprogrammen : Paintshop and Micrografx.

mfg
 
03/05/09  
 



by me not.
first comes of course 0 248 0 8x then again 224 7 224 8x and 31 0 31 8x the until schluss.

Zeig time your Ausleseprogramm.

mfg
 
03/05/09  
 



Wohlbemerkt The values imho not stature RGB separate BGR exist.
 
03/05/09  
 



playing now in the Test no role, derweil each colour the value 255 particular has. at least must the really with of/ one small Fluctuation seperat rauskommen and not these spending supra. Perhaps is my Aufrufreihenfolge wrong...

mfg
 
03/05/09  
 




Jörg
Sellmeyer
Peter Bierbachh
by me not.
first comes of course 0 248 0 8x then again 224 7 224 8x and 31 0 31 8x the until schluss.

Zeig time your Ausleseprogramm.

mfg


which Ausleseprogramm? I habs with your code read.
The Bitmap is with CorelDraw prepares.
Zeig still time your Bitmap.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03/05/09  
 



in the attachment are The Bitmap.

mfg

15 kB
Hochgeladen:03/05/09
Downloadcounter168
Download
15 kB
Hochgeladen:03/05/09
Downloadcounter151
Download
 
03/05/09  
 




E.T.
even (because of yet-not-sleep-can ) time probiert:
Test1 and Test2.bmp show by me each 255 (remainder 0) for jeweilige colour on (Photoshop and AutoCad). likewise The bmp of Jörg.

The in the o.g. Source used Test.bmp is well not thereby or has at Upload whom name changed ??
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
03/06/09  
 



 
- Page 3 -


I have now time nachgeschaut and fixes the The dissolution on 16bit run is instead of on 32bit.
I knows not yet which Program the affect.
me fell now, that I The Window in the Vollbildmodus move can instead of in the Rändermodus, though I before on Rändermodus went on the Grafikkarte. there have I then too fixes thats on 16bit stood.

mfg
 
03/06/09  
 




Jörg
Sellmeyer
well look on - soon counts means not only Minimalnbeispiel post, separate same whom whole computer mitschicken
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03/06/09  
 



another trouble.
If I The Bitmap copy to new1& comes only one schwarzes Viereck if I it next to the others graphic set.
must the too somehow again transformed go?

mfg
window 30,30-500,500
 $H windows.ph
declare bmi#,b#
declare Pic$,Handle&,Neu&,wert&,hwin&,new1&
Window 20,20-200,200
hWin& = Create(Window, %hWnd, Test, 250, 20, 650,500)
Pic$=Test.bmp
Handle&=create(hpic,-1,Pic$)
struct bmpHEADER=Size&,Width&,Height&,Planes%,BitCount%,Compression&,SizeImage&,X#(24)
dim bmi#,bmpHEADER
bmi#.Size&=sizeof(bmi#)------------------Size of BITMAPINFOHEADER
~GetDIBits(%hdc,Handle&,0,0,0,bmi#,0)--Dummy-appeal, circa bmpHeader To fill (Return: 1=OK)
print sizeof(bmi#)
dim b#,bmi#.SizeImage&-----------------area for Bildinformationen (Pixel) provide
~GetDIBits(%hdc,Handle&,0,bmi#.height&,b#,bmi#,0)--Eigendliche Bilddaten from lever detect
Neu&=~CreateDIBitmap(%hdc,bmi#,4,b#,bmi#,0)------new DIB with modified colours produce
startpaint hwin&
drawpic Neu&,0,0;0
endpaint
neu1&=create(hpiccopy,hwin&,0,0,64,64)
startpaint hwin&
drawpic new1&,100,0;0
endpaint
wert&=bmi#.SizeImage&

whileloop 0,wert&,4

    print byte(b#,&loop),byte(b#,&loop+1),byte(b#,&loop+2)
    sleep 20

endwhile

dispose bmi#
dispose b#
waitkey
 
03/06/09  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

18.766 Views

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie