Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparency band not persisted in QgsProject #14749

Closed
qgib opened this issue Feb 7, 2012 · 6 comments
Closed

Transparency band not persisted in QgsProject #14749

qgib opened this issue Feb 7, 2012 · 6 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Feb 7, 2012

Author Name: Tim Sutton (Tim Sutton)
Original Redmine Issue: 4953
Affected QGIS version: master
Redmine category:rasters
Assignee: Tim Sutton


When using a single band raster and setting the tranparency band to band 1, the transparency is correctly applied. However when closing and then reopening the project, the layer transparency band reverts to 'Not Set'.

Expected behaviour:

The transparency band state should be properly restored to band 1 when the project is opened.

@qgib
Copy link
Contributor Author

qgib commented Apr 16, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.7.4 to Version 1.8.0

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.8.0 to Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Oct 25, 2012

Author Name: Homme Zwaagstra (Homme Zwaagstra)


This is an issue for me in QGIS 1.8.0. Whichever band is selected as the transparency band it is not persisted in the .qgs project file. The following is the map layer corresponding to a grayscale TIF whose alpha band I am trying to set as the transparent band:

<maplayer minimumScale="0" maximumScale="1e+08" type="raster" hasScaleBasedVisibilityFlag="0">
    <id>hillshade20121025100031179</id>
    <datasource>./hillshade.tif</datasource>
    <title></title>
    <abstract></abstract>
    <layername>hillshade</layername>
    <srs>
        <spatialrefsys>
            <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
            <srsid>3452</srsid>
            <srid>4326</srid>
            <authid>EPSG:4326</authid>
            <description>WGS 84</description>
            <projectionacronym>longlat</projectionacronym>
            <ellipsoidacronym>WGS84</ellipsoidacronym>
            <geographicflag>true</geographicflag>
        </spatialrefsys>
    </srs>
    <transparencyLevelInt>62</transparencyLevelInt>
    <customproperties/>
    <provider>gdal</provider>
    <rasterproperties>
        <mDrawingStyle>MultiBandSingleBandGray</mDrawingStyle>
        <mColorShadingAlgorithm>UndefinedShader</mColorShadingAlgorithm>
        <mInvertColor boolean="false"/>
        <mRedBandName>Band 1</mRedBandName>
        <mGreenBandName>Band 2</mGreenBandName>
        <mBlueBandName>Band 2</mBlueBandName>
        <mGrayBandName>Band 1</mGrayBandName>
        <mStandardDeviations>0</mStandardDeviations>
        <mUserDefinedRGBMinimumMaximum boolean="false"/>
        <mRGBMinimumMaximumEstimated boolean="true"/>
        <mUserDefinedGrayMinimumMaximum boolean="false"/>
        <mGrayMinimumMaximumEstimated boolean="true"/>
        <mContrastEnhancementAlgorithm>NoEnhancement</mContrastEnhancementAlgorithm>
        <contrastEnhancementMinMaxValues>
            <minMaxEntry>
                <min>0</min>
                <max>255</max>
            </minMaxEntry>
            <minMaxEntry>
                <min>0</min>
                <max>255</max>
            </minMaxEntry>
        </contrastEnhancementMinMaxValues>
        <mNoDataValue mValidNoDataValue="true">-32768.000000</mNoDataValue>
        <singleValuePixelList>
            <pixelListEntry pixelValue="-32768.000000" percentTransparent="100"/>
        </singleValuePixelList>
        <threeValuePixelList>
            <pixelListEntry red="-32768.000000" blue="-32768.000000" green="-32768.000000" percentTransparent="100"/>
        </threeValuePixelList>
    </rasterproperties>
</maplayer>

@qgib
Copy link
Contributor Author

qgib commented Oct 25, 2012

Author Name: Giovanni Manghi (@gioman)


Homme Zwaagstra wrote:

This is an issue for me in QGIS 1.8.0. Whichever band is selected as the transparency band it is not persisted in the .qgs project file. The following is the map layer corresponding to a grayscale TIF whose alpha band I am trying to set as the transparent band:

[...]

have you tested qgis master? many things changed in rasters in qgis master... please try and leave feedback.


  • status_id was changed from Open to Feedback
  • operating_system was changed from all to

@qgib
Copy link
Contributor Author

qgib commented Oct 29, 2012

Author Name: Homme Zwaagstra (Homme Zwaagstra)


Giovanni Manghi wrote:

have you tested qgis master? many things changed in rasters in qgis master... please try and leave feedback.

I have tested in qgis master against commit a27aad0 (1.9.0 Alpha) and it seems to have fixed the issue - thanks!

@qgib
Copy link
Contributor Author

qgib commented Oct 29, 2012

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed
  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats) labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant