Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I add a new raster layer in the latest QGIS and select a JPG file, but it is all black. I tried adding the TIF version of the same image and that worked.

What is it with the JPG, and how should I import it correctly? Thank!

share|improve this question
    
Can you open the jpeg in any other application to confirm that the file does work? –  Ando Apr 4 '11 at 21:02
    
@Ando: yes the jpg file looks just fine, in fact it appears fine in ArcGIS, too. :) But I just like to use it in QGIS. –  hpy Apr 4 '11 at 21:16
2  
What kind of .jpg is this? Classified .jpgs such as DRGs often come in poorly and their colors need to be set manually after any kind of geoprocessing. –  jvangeld Apr 4 '11 at 21:45
    
@jvangeld I don't know, how do I find out? I am running Mac OS X 10.6.7, but have an Arch Linux virtual machine if I need to do it there. –  hpy Apr 4 '11 at 21:47

2 Answers 2

up vote 2 down vote accepted

It seems QGIS doesn't set the correct band in the jpg raster. You can fix this by double clicking your raster layer and changing the bands

Where it says Red, Green, Blue Band they must all be the right color bands from the jpg. Change Green band drop down to Band 2 and Blue band drop down to Band 3

enter image description here

share|improve this answer
    
I checked, turns out that the bands are already correctly set. Any other ideas? Thanks! –  hpy Apr 4 '11 at 20:50
    
Which version of qgis are you running? –  Nathan W Apr 4 '11 at 20:52
    
I installed the Mac OS X 10.6.7 package links from the QGIS website, which is 1.7.0 built against code revision 15531M. –  hpy Apr 4 '11 at 20:54
1  
hmmm I'm sure at the moment. I'll keep having a look around unless someone else knows what is going on. –  Nathan W Apr 4 '11 at 20:56

Here is a link to the QGIS forum reporting something similar in terms of band combinations. This article is referring to rasters generated in GRASS but there maybe some similarities.

Another trick that has worked for me in the past. Make sure the .jpg file has an associated world file .jgw and a projection file .prj. These can be generated from exporting through ArcGIS (which I think you mentioned you have access to). I was experiencing a similar problem in geoserver when adding a raster once I added the .jgw and .prj files it fixed my problem.

The reason why I think this may work in your case is that there were a number of qgis forum posts pointing to "black raster images" when the image had no projection information. I believe the addition of the world file and projection file may help here.

I hope this helps...good luck

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.