<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<style>.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Special thanks Even. You are always quick and to the point! Thank you very much. <br>As you pointed out, I was handling JPEG in the same manner as GTiff; I did not use the MEM driver first. <br><br>With best regards.<br>~Belaid.<br><br>> From: even.rouault@mines-paris.org<br>> To: gdal-dev@lists.osgeo.org<br>> Subject: Re: [gdal-dev] JPEG format.<br>> Date: Wed, 29 Jul 2009 19:55:46 +0200<br>> CC: belaid_moa@hotmail.com<br>> <br>> Le Wednesday 29 July 2009 19:44:41 Belaid MOA, vous avez écrit :<br>> > Hi Everyone,<br>> > When I try to use GDALCreate() on the JPEG driver, I got the following<br>> > error: "GDALDriver::Create() ... no create method implemented for this<br>> > format." Does is this mean that JPEG driver does not have its GDALCreate()<br>> > function implemented?<br>> <br>> Hum, I can admit that sometimes error messages are not particularly clear, but <br>> here .... !<br>> <br>> > Any example on how to use JPEG driver is appreciated. <br>> <br>> The JPEG is no different from other drivers. The fact that the Create() method <br>> is not implemented just reflect the fact that you can't write data at random <br>> scanlines in a JPEG file, it must be created scanline by scanline, from top <br>> to bottom. So you want to use the CreateCopy() method instead. As a source <br>> raster for the CreateCopy(), you can use a dataset created with the MEM <br>> driver (that supports the Create() method), or any other disk-based format <br>> like GTIFF that supports the Create() method.<br>> <br>> Schematically (in Python) :<br>> <br>> mem_ds = gdal.GetDriverByName('MEM').Create(....)<br>> mem_ds.WriteRaster(....)<br>> <br>> jpeg_ds = gdal.GetDriverByName('JPEG').CreateCopy(mem_ds, "out.jpg")<br>> jpeg_ds = None<br>> mem_ds = None<br>> <br>> ><br>> > As always, any help on this is very appreciated.<br>> ><br>> > With best regards.<br>> > ~Belaid<br>> ><br>> > _________________________________________________________________<br>> > Stay in the loop and chat with friends, right from your inbox!<br>> > http://go.microsoft.com/?linkid=9671354<br>> <br>> <br><br><hr>More storage. Better anti-spam and antivirus protection. <a href="http://go.microsoft.com/?linkid=9671352">Hotmail makes it simple.</a><br /><hr />Send and receive email from all of your webmail accounts - right from <a href='http://go.microsoft.com/?linkid=9671351' target='_new'>your Hotmail inbox!</a></body>
</html>