<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Hi Bruce,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2>As Frank says all that is done by <FONT
face="Courier New">GDALCreateDib </FONT><FONT face=Arial>is call </FONT><FONT
face="Courier New">poDataset->GetRasterBand()->RasterIO() </FONT><FONT
face=Arial>and cleanly fill a DIB with the result of these
calls.</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>How <FONT face="Courier New">RasterIO</FONT> deals
with size shrinks is a GDAL problem ;-)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>BTW there is a (very) small bug in the code I
posted at <A
href="http://article.gmane.org/gmane.comp.gis.gdal.devel/2269/">http://article.gmane.org/gmane.comp.gis.gdal.devel/2269/</A> .
If someone requests I can post an updated version.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The XP GDI+ library is much more powerful than GDI.
If you write a <FONT face="Courier New">CGdalImage</FONT> class derived from
<FONT face="Courier New">CImage</FONT>, I will be glad to use it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>cheers</FONT></DIV>
<DIV><FONT face=Arial size=2>AR</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>----- Original Message ----- </FONT>
<DIV><FONT face=Arial size=2>From: "Frank Warmerdam" <</FONT><A
href="mailto:fwarmerdam@gmail.com"><FONT face=Arial
size=2>fwarmerdam@gmail.com</FONT></A><FONT face=Arial size=2>></FONT></DIV>
<DIV><FONT face=Arial size=2>To: "Clay, Bruce" <</FONT><A
href="mailto:bclay@ball.com"><FONT face=Arial
size=2>bclay@ball.com</FONT></A><FONT face=Arial size=2>></FONT></DIV>
<DIV><FONT face=Arial size=2>Cc: <</FONT><A
href="mailto:gdal-dev@xserve.flids.com"><FONT face=Arial
size=2>gdal-dev@xserve.flids.com</FONT></A><FONT face=Arial
size=2>></FONT></DIV>
<DIV><FONT face=Arial size=2>Sent: Tuesday, February 08, 2005 11:37
PM</FONT></DIV>
<DIV><FONT face=Arial size=2>Subject: Re: [Gdal-dev] gDAL -->
DIB</FONT></DIV></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV><FONT face=Arial
size=2>> On Tue, 8 Feb 2005 17:20:12 -0500, Clay, Bruce <</FONT><A
href="mailto:bclay@ball.com"><FONT face=Arial
size=2>bclay@ball.com</FONT></A><FONT face=Arial size=2>>
wrote:<BR>>> <BR>>> A question of Alain Rist or anyone that
has been able to get the<BR>>> CreateDibFromFile method he posted to work.
<BR>>> <BR>>> I can load the images and display them in an MFC
application but the images<BR>>> are mostly white with very few features
showing as compared to looking at<BR>>> the same image in imageLinker or
iView. <BR>>> <BR>>> Does anyone have any thoughts as to what could
be causing this or another<BR>>> method that might be used with windows
apps to display GDAL data? <BR>> <BR>> Bruce, <BR>> <BR>> One
obvious possible reason would be if you were loading 16bit<BR>> data
files. All values larger than 255 would by truncated to 255. <BR>>
However, I think you will need to provide some more information<BR>> in order
to get a concrete answer. <BR>> <BR>> Best regards,<BR>> <BR>>
-- <BR>>
---------------------------------------+--------------------------------------<BR>>
I set the clouds in motion - turn up | Frank Warmerdam, </FONT><A
href="mailto:warmerdam@pobox.com"><FONT face=Arial
size=2>warmerdam@pobox.com</FONT></A><BR><FONT face=Arial size=2>> light and
sound - activate the windows | </FONT><A
href="http://pobox.com/~warmerdam"><FONT face=Arial
size=2>http://pobox.com/~warmerdam</FONT></A><BR><FONT face=Arial size=2>>
and watch the world go round - Rush | Geospatial Programmer
for Rent<BR>> _______________________________________________<BR>>
Gdal-dev mailing list<BR>> </FONT><A
href="mailto:Gdal-dev@xserve.flids.com"><FONT face=Arial
size=2>Gdal-dev@xserve.flids.com</FONT></A><BR><FONT face=Arial size=2>>
</FONT><A href="http://xserve.flids.com/mailman/listinfo/gdal-dev"><FONT
face=Arial
size=2>http://xserve.flids.com/mailman/listinfo/gdal-dev</FONT></A><BR><FONT
face=Arial size=2>></FONT></BODY></HTML>