BUG: misc: In fromimage(), don't convert if it isn't needed.
BUG: misc: In fromimage(), don't convert if it isn't needed.

If the user gives a mode, don't bother converting the image if it
is already that mode.  This avoids a UserWarning generated by PIL
if mode='P' is requested for an indexed RGBA image.  For example,
before change in this commit:

    >>> imread('foo3x5x4indexed.png', mode='P')
    [...]/site-packages/[...]/Image.py:857: UserWarning: Palette
    images with Transparency expressed in bytes should be converted
    to RGBA images

mikebenfield/scipy,chatcannon/scipy,rgommers/scipy,andyfaff/scipy,gdooper/scipy,argriffing/scipy,maniteja123/scipy,sriki18/scipy,mdhaber/scipy,endolith/scipy,zerothi/scipy,WarrenWeckesser/scipy,pizzathief/scipy,haudren/scipy,rgommers/scipy,andyfaff/scipy,apbard/scipy,mdhaber/scipy,woodscn/scipy,befelix/scipy,woodscn/scipy,WarrenWeckesser/scipy,anielsen001/scipy,matthew-brett/scipy,josephcslater/scipy,nonhermitian/scipy,dominicelse/scipy,pizzathief/scipy,kleskjr/scipy,larsmans/scipy,jamestwebber/scipy,perimosocordiae/scipy,haudren/scipy,gdooper/scipy,Gillu13/scipy,tylerjereddy/scipy,gertingold/scipy,zerothi/scipy,mdhaber/scipy,larsmans/scipy,grlee77/scipy,perimosocordiae/scipy,nmayorov/scipy,gfyoung/scipy,WarrenWeckesser/scipy,maniteja123/scipy,apbard/scipy,zerothi/scipy,WarrenWeckesser/scipy,arokem/scipy,aeklant/scipy,befelix/scipy,befelix/scipy,kalvdans/scipy,anielsen001/scipy,behzadnouri/scipy,behzadnouri/scipy,mikebenfield/scipy,nonhermitian/scipy,surhudm/scipy,zerothi/scipy,Gillu13/scipy,jjhelmus/scipy,jamestwebber/scipy,gdooper/scipy,behzadnouri/scipy,maniteja123/scipy,endolith/scipy,mikebenfield/scipy,dominicelse/scipy,jamestwebber/scipy,anielsen001/scipy,Newman101/scipy,Gillu13/scipy,anntzer/scipy,Newman101/scipy,argriffing/scipy,matthew-brett/scipy,lhilt/scipy,josephcslater/scipy,pbrod/scipy,anntzer/scipy,befelix/scipy,pyramania/scipy,haudren/scipy,niknow/scipy,pbrod/scipy,Stefan-Endres/scipy,anntzer/scipy,scipy/scipy,pbrod/scipy,larsmans/scipy,vigna/scipy,matthewalbani/scipy,mikebenfield/scipy,sriki18/scipy,surhudm/scipy,sriki18/scipy,jakevdp/scipy,befelix/scipy,Shaswat27/scipy,e-q/scipy,person142/scipy,jjhelmus/scipy,grlee77/scipy,perimosocordiae/scipy,jor-/scipy,gfyoung/scipy,Stefan-Endres/scipy,Shaswat27/scipy,bkendzior/scipy,matthew-brett/scipy,pschella/scipy,anielsen001/scipy,lhilt/scipy,aeklant/scipy,pizzathief/scipy,person142/scipy,WarrenWeckesser/scipy,scipy/scipy,ilayn/scipy,matthewalbani/scipy,niknow/scipy,Shaswat27/scipy,josephcslater/scipy,ilayn/scipy,ilayn/scipy,mdhaber/scipy,woodscn/scipy,nmayorov/scipy,Gillu13/scipy,mdhaber/scipy,e-q/scipy,Shaswat27/scipy,aeklant/scipy,dominicelse/scipy,endolith/scipy,nonhermitian/scipy,vigna/scipy,behzadnouri/scipy,sriki18/scipy,e-q/scipy,pschella/scipy,jakevdp/scipy,Shaswat27/scipy,tylerjereddy/scipy,aarchiba/scipy,ilayn/scipy,chatcannon/scipy,scipy/scipy,niknow/scipy,kleskjr/scipy,haudren/scipy,argriffing/scipy,maniteja123/scipy,scipy/scipy,jor-/scipy,matthewalbani/scipy,rgommers/scipy,lhilt/scipy,dominicelse/scipy,jakevdp/scipy,Stefan-Endres/scipy,niknow/scipy,gertingold/scipy,jjhelmus/scipy,anntzer/scipy,pbrod/scipy,nonhermitian/scipy,woodscn/scipy,andyfaff/scipy,person142/scipy,argriffing/scipy,grlee77/scipy,e-q/scipy,gfyoung/scipy,surhudm/scipy,niknow/scipy,pizzathief/scipy,tylerjereddy/scipy,matthew-brett/scipy,jakevdp/scipy,Eric89GXL/scipy,pschella/scipy,vigna/scipy,lhilt/scipy,rgommers/scipy,tylerjereddy/scipy,kalvdans/scipy,pschella/scipy,arokem/scipy,bkendzior/scipy,jamestwebber/scipy,grlee77/scipy,matthewalbani/scipy,surhudm/scipy,bkendzior/scipy,anielsen001/scipy,anntzer/scipy,rgommers/scipy,josephcslater/scipy,nonhermitian/scipy,endolith/scipy,larsmans/scipy,Newman101/scipy,Gillu13/scipy,haudren/scipy,bkendzior/scipy,perimosocordiae/scipy,larsmans/scipy,jjhelmus/scipy,surhudm/scipy,apbard/scipy,pbrod/scipy,arokem/scipy,nmayorov/scipy,surhudm/scipy,maniteja123/scipy,argriffing/scipy,haudren/scipy,scipy/scipy,mdhaber/scipy,Stefan-Endres/scipy,nmayorov/scipy,anntzer/scipy,chatcannon/scipy,arokem/scipy,kleskjr/scipy,pyramania/scipy,aarchiba/scipy,apbard/scipy,woodscn/scipy,perimosocordiae/scipy,pyramania/scipy,scipy/scipy,Eric89GXL/scipy,chatcannon/scipy,zerothi/scipy,andyfaff/scipy,pizzathief/scipy,pyramania/scipy,niknow/scipy,maniteja123/scipy,Gillu13/scipy,jamestwebber/scipy,aarchiba/scipy,gfyoung/scipy,sriki18/scipy,arokem/scipy,larsmans/scipy,Stefan-Endres/scipy,kalvdans/scipy,person142/scipy,chatcannon/scipy,kalvdans/scipy,sriki18/scipy,aarchiba/scipy,matthewalbani/scipy,gdooper/scipy,apbard/scipy,woodscn/scipy,perimosocordiae/scipy,matthew-brett/scipy,ilayn/scipy,argriffing/scipy,e-q/scipy,kleskjr/scipy,gdooper/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,jor-/scipy,mikebenfield/scipy,josephcslater/scipy,Eric89GXL/scipy,aeklant/scipy,jor-/scipy,ilayn/scipy,dominicelse/scipy,zerothi/scipy,tylerjereddy/scipy,jakevdp/scipy,aarchiba/scipy,pschella/scipy,Stefan-Endres/scipy,behzadnouri/scipy,gfyoung/scipy,endolith/scipy,anielsen001/scipy,Eric89GXL/scipy,behzadnouri/scipy,pbrod/scipy,gertingold/scipy,andyfaff/scipy,person142/scipy,nmayorov/scipy,kleskjr/scipy,Newman101/scipy,grlee77/scipy,bkendzior/scipy,kleskjr/scipy,Shaswat27/scipy,jjhelmus/scipy,andyfaff/scipy,aeklant/scipy,gertingold/scipy,Eric89GXL/scipy,chatcannon/scipy,Newman101/scipy,kalvdans/scipy,pyramania/scipy,Newman101/scipy,lhilt/scipy,vigna/scipy,endolith/scipy,jor-/scipy,vigna/scipy,gertingold/scipy