Opened 11 years ago

Closed 9 years ago

#282 closed defect (wontfix)

PNG encoding does not recognize band labeling

Reported by: Piero Campalani Owned by: Piero Campalani
Priority: trivial Milestone:
Component: petascope Version: 8.3
Keywords: png labels range construct Cc: Dimitar Misev, abeccati, Alireza, Marcus Sen
Complexity: Medium

Description

It seems that when encoding a PNG with a WCPS query with explicit definition of the single bands, the order of the bands is fixed to R, then G, then B, independently of which label is set in the query.

This means that the following queries are equivalent:

for c in (rgb) return encode({
  red:   c.red;
  green: c.green;
  blue:  c.blue}, "png")
for c in (rgb) return encode({
  green: c.red;
  red:   c.green;
  blue:  c.blue}, "png")

Change History (8)

comment:1 by Dimitar Misev, 11 years ago

Resolution: invalid
Status: newclosed

yes there's no semantics attached to the band labels as far as I know, i.e. it's just some random name for query documentation I guess. So I'd close this ticket as invalid.

comment:2 by abeccati, 11 years ago

Priority: minortrivial
Resolution: invalid
Status: closedreopened

This is at least quite confusing from an user perspective and should be addressed somehow (with "trivial" priority) e.g. at least clearly documented.

Labeling determines the name of the range field in the created coverage and they are clearly not interpreted by the PNG formatter (which is not part of the WCPS standard itself).

Something that would nicely fit into the user manual in something like "supported formats"

comment:3 by abeccati, 11 years ago

Owner: changed from abeccati to Piero Campalani
Status: reopenedassigned

comment:4 by Piero Campalani, 11 years ago

I agree, it should be addressed: do we want to specify this in the user manual, or do we want to enable assignment by label in the WCPS?

comment:5 by Dimitar Misev, 11 years ago

Which user manual? I only know of the WCPS standard 08-068r2

What matters is the order of the range components → PNG obviously expects them in RGB(A) order, so if you want to switch red and green you'd do

for c in (rgb) return encode({
  R: c.green;
  G: c.red;
  B: c.blue},
"png")

comment:6 by Marcus Sen, 10 years ago

Cc: Marcus Sen added
Complexity: Very Hard

comment:7 by Piero Campalani, 10 years ago

Complexity: Very HardMedium
Keywords: png labels range construct added

comment:8 by Dimitar Misev, 9 years ago

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.