bugFreeciv - Bugs: bug #22457, Fully transparent flags

 
 
Show feedback again

bug #22457: Fully transparent flags

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Sun 10 Aug 2014 09:52:56 PM UTC  
 
Category: client-gtk-3.0Severity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.4.4, 2.5.0-beta2, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 19 Aug 2014 10:36:18 PM UTC, SVN revision 25955:

Fixed gtk3-client sprite boundaries checking to work in high-endian environments.

See bug #22457

(Browse SVN revision 25955)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 19 Aug 2014 10:36:12 PM UTC, SVN revision 25954:

Fixed gtk3-client sprite boundaries checking to work in high-endian environments.

See bug #22457

(Browse SVN revision 25954)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 19 Aug 2014 10:36:03 PM UTC, SVN revision 25953:

Fixed gtk3-client sprite boundaries checking to work in high-endian environments.

See bug #22457

(Browse SVN revision 25953)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 14 Aug 2014 11:15:33 PM UTC, comment #4:

This is endianness problem. From cairo documentation about CAIRO_FORMAT_ARGB32: "The 32-bit quantities are stored native-endian." So sprite_get_bounding_box() was not checking of transparency (alpha channel) but Blue component. Flags with no blue were considered totally transparent.

Fix attached.

(file #21731)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 10 Aug 2014 11:45:02 PM UTC, comment #3:

> Does this explain bug #21692?


Indeed, bug #21692 seems like more general problem than this single symptom I've noticed.
The absent German flag is certainly this one (not a single pixel visible). Others sound like sprite_get_bounding_box() found limits of the flag, but parts of what should be included are left out.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 10 Aug 2014 11:27:35 PM UTC, comment #2:

Does this explain bug #21692?

Jacob Nevins <jtn>
Project Administrator
Sun 10 Aug 2014 09:56:16 PM UTC, comment #1:

List of affected flags from the load_gfxfile() test I run:

aborigines-large.png
aborigines-shield-large.png
aram-large.png
aram-shield-large.png
avar-large.png
avar-shield-large.png
baden-large.png
baden-shield-large.png
chuvashia-large.png
chuvashia-shield-large.png
germany-large.png
germany-shield-large.png
ghaznavid-large.png
ghaznavid-shield-large.png
gupta-large.png
gupta-shield-large.png
illyria-large.png
illyria-shield-large.png
kashubia-large.png
kashubia-shield-large.png
macedonia-large.png
macedonia-shield-large.png
numidia-large.png
numidia-shield-large.png
ottoman-large.png
ottoman-shield-large.png
saka-large.png
saka-shield-large.png
scythia-large.png
scythia-shield-large.png
sikh-large.png
sikh-shield-large.png
silesia-large.png
silesia-shield-large.png
rvn-large.png
rvn-shield-large.png
soviet-large.png
soviet-shield-large.png
tuareg-large.png
tuareg-shield-large.png
wallonia-large.png
wallonia-shield-large.png

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 10 Aug 2014 09:52:56 PM UTC, original submission:

Continuation from bug #21373

sprite_get_bounding_box() still considers some flags completely empty (all pixels completely transparent).
These cases seem to be flags that cairo_image_surface_create_from_png() returns as CAIRO_FORMAT_ARGB32 from the beginning, and they are broken immediately after being loaded (test with sprite_get_bounding_box() used in load_gfxfile())

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #21731:  Gtk3Endianness.patch added by cazfi (2kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 19 Aug 2014 10:36:28 PM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 14 Aug 2014 11:15:33 PM UTCcazfiAttached File-=>Added Gtk3Endianness.patch, #21731
      StatusNone=>Ready For Test
      Planned Release=>2.4.4, 2.5.0-beta2, 2.6.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup