ThinkGeo.com    |     Documentation    |     Premium Support

Problem with JPG files

Hello!!


I have two files JPG. One of them loads without problems but with other one it gives me a mistake of this type: generic Mistake in GDI +.


The code is the same in the two aplications but i don't know what's happend...



 



Dim ortofoto As New GdiPlusRasterLayer("C:\Users\Administrador\Desktop\Zaragoza\Ortofoto\Prueba_JPG_3G.jpg")Map1.StaticOverlay.Layers.Add("orto", ortofoto)

In the new version. There is some kind of problem with the diferent resolution of the images? Or maybe with pixel's represents in the reality?


Thanks!!!




Carlos, 
  
 First please check if you have the world file (*.jgw) with that in the same forder.  
 If yes, can you have a quick test if the jpg can be opened by GDI+ bitmap? You can drag and drop a pictureBox and show that the jpg there with the following code.  
  
 Dim bitmap As New Bitmap"C:\Users\Administrador\Desktop\Zaragoza\Ortofoto\Prueba_JPG_3G.jpg") 
         PictureBox1.Image = bitmap 
  
 If that works fine, please send that file to us for further investigation?  If not can you double check the jpg file to see if it is correct or supported by GDI+? 
  
 Ben