Code for Display of Oversized Portraits Needs Explanation

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

Code for Display of Oversized Portraits Needs Explanation

Post by Wussel »

I made some tests in Wesnoth 1.10 and got hit by canvas size error. A search found only a similar problem by Doofus.
http://forums.wesnoth.org/viewtopic.php ... 55#p553169

When will this error be triggered? Can it be avoided? I got the impression that it applies to profile/portrait. Could an image with message be bigger?

Did the semi transparent speech area get smaller? Can I get it back to old size? I am under the impression, that Wesnoth 1.6 scaled all pictures to 80% on standard wide screen laptops. Do I have to do thast by code in 1.10? What would be the code?
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: canvas size error

Post by Dugi »

The problem Doofus mentioned was related to a bug in the iOS port. I believe it is not your case. Can you describe the problem in a more detailed way, like which WML snippet with which pictures caused it?

I have never had any problem with canvas size related to portraits, but I had the hell a lot of them with GUI lua.
Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

Re: canvas size error

Post by Wussel »

We are talking about oversize pictures here. There is an error code now in 1.10. It is triggered if you have picture bigger than 500x500. I am telling you a secret now and hope that is not making things even worse in the future: 800x500 and 500x800 can be displayed. But 700x 560 will cause the error.

More over really annoying: The long picture is scaled by DIFFERENT amounts according to length and maybe screen resolution. Totally odd numbers. For 800 it is roughly 5/6 for me.

The wide picture is displayed as it is with no automatic scaling. This is really useless. If you want to add speech bubbles with this blit function you need more canvas size!

Could somebody please enlighen us, what the code is doing? Before there were Wesnoth crashes, if you exceeded the screen size. Scaling was allways the same (for me 80%). Now there is the canvas size error at levels which could be displayed and the campaigns get closed, but Wesnoth is not crashing anymore.

This is completly useless from the user point of view. I admit, that a programmer might think it is a solution to prevend crash reports from Wesnoth at large.

Best Solution would be:
Whatever picture is there, gets dsplayed. What does not fit gets truncated at the end of the window. Scaling can be set manually in preferences like 100%, 80% 60% 40%. A note should be given what setting for which device would be best.

It could be so simple. Why force user like Doofus to scale his portraits down to 500x500???

Please write some clear instruction on the behavior of Wesnoth, when displaying oversize pictures. Finding it out by try and error is really time consuming. Doofus mentioned his time too.
.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: canvas size error

Post by Dugi »

Darn, you still didn't explain when does it happen. When you're using a classical [message]? When using [story]? When using wesnoth.show_dialog? When it is a halo? You might possibly be using all of these for dialogues with speech bubbles.

I have encountered problems with image size when using wesnoth.show_dialog, in some cases it's total craziness, but judging from your other posts, it is not very likely that you're using it.
Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

Re: canvas size error

Post by Wussel »

Oh, sorry. Stoy is no problem. Allways scaled perfectly to fit screen. I am talking about pictures beeing displayed with messages like portraits and other.

Pseudo code for crashing Wesnoth:

Crash-Event
...Message =bla
...Image=oversize
/Crash-Event
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: canvas size error

Post by Dugi »

If I was you, I'd fill a bug report, find the largest size that does not crash it and use it as canvas (because it usually takes ages till a reported bug is fixed). Alternatively, you might write the scenarios in a way that they can be restarted at any point (saving all units and progression somewhere), at the time of a dialogue start a dialogue scenario and use the resizing in [story] and then restore the scenario (but this isn't easy nor comfortable).
Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

Re: canvas size error

Post by Wussel »

This is not a bug. It is a feature.
Just not a usefull one. There is a mole somewhere in the project, who is making Wesnoth less open and less finished.
Maybe somebody just afraid, that there will be nothing more to do.

Bug report:
http://gna.org/bugs/index.php?21104
Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

Code for display of oversized portraits needs explanation!

Post by Wussel »

Somebody changed it for the 1.10 version. Could somebody please check the code and explains what it does? Users like doofus do like to display oversized portraits. (angel with wings and such)

Based on my testings my computer can display 800x500 and 500x 800 but not 800x800. The tallpicture gets scaled differently depending on hight. The wide picture does not get scaled.

Please understand that these 2 things in combination are extremly annoying. Best would be to allow all sizes and allway scale them to windows size, if to big. If somebody wants to use oversize pictures and cares about proportion, they could allways use same canvas size.

THE QUESTION IS: What is the Wesnoth code actually doing??? Please answer if there is anybody who knows.
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Code for display of oversized portraits needs explanatio

Post by Max »

if i'm not mistaken this is closely related to another thread of yours:
http://forums.wesnoth.org/viewtopic.php?f=21&t=39311

you've already created a bug report and have been asked to provide feedback on how to reproduce this issue. sounds like this could be done be just replacing a core image that is used in the first scenario of a mainline campaign with one of a larger size...

my apologies if these are two different issues...
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: canvas size error

Post by Turuk »

I have combined your new thread into your current thread on the same issue.

Please do not create multiple threads on the same topic.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

Re: canvas size error

Post by Wussel »

Combining is ok. BUT THIS IS NOT A WML ISSUE!

Please move to coders corner. The problem has NOTHING to do with WML. Therefore shift everything to CODERS CORNER!

Thanks for your support!

Please use the new headline, as it is more descriptive.
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Code for Display of Oversized Portraits Needs Explanatio

Post by Turuk »

Posting Guidelines wrote: a. Write clearly (#)
...No SHOUTING in threads — it’s rude and won’t get you anywhere...

Moved to the proper forum and title changed on request.

In the future, watch the use of caps lock.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
Wussel
Posts: 624
Joined: July 28th, 2012, 5:58 am

Re: Code for Display of Oversized Portraits Needs Explanatio

Post by Wussel »

I have to learn how to use the posh green color. Is bold or underline still allowed?
Is my question really so difficult? Nobody knows how art is displayed in this game?

Somebody changed the code for 1.10. I am not asking why. I just want to know what.
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Code for Display of Oversized Portraits Needs Explanatio

Post by Turuk »

Wussel wrote:I have to learn how to use the posh green color. Is bold or underline still allowed?
The color is for moderators, and the Posting Guidelines are still at the top of each page.
Wussel wrote:Is my question really so difficult? Nobody knows how art is displayed in this game?
No, but a developer who knows might not frequent the forum that often to have responded yet. Most of them are available on IRC.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Code for Display of Oversized Portraits Needs Explanatio

Post by JaMiT »

Wussel wrote:Is my question really so difficult?
Yes. It is really difficult to figure out what you are talking about. (You were even told as much by soliton in your bug report. Hint: pay attention when someone is trying to help you.)

Try starting over from the beginning (not in a new topic), and explain what you did, what you expected, and what happened. Include concrete examples. Make it so that someone who cannot read your mind can reproduce whatever it is you're miffed about. It might help to keep a neutral tone (don't assume whatever it is you are encountering is intentional, and don't assume it is wrong), avoid commentary, and don't get sidetracked in digressions. Just the facts, laid out clearly. Then, once you've got the context established, try asking your question again.


Hmm... I do spot one question I sort of know an answer to:
Wussel wrote:Why force user like Doofus to scale his portraits down to 500x500???
To avoid biggerism, last I heard. Or to put it another way, to maintain a consistent scale across portraits. It starts by someone wanting an extra 50 pixels per dimension for a "really awesome" portrait of something that's "really big, and deserves a bigger portrait". Then others see that 550x550 portrait, and start using that size for portraits that are less awesome, of things less sizable. So when the next "really awesome" portrait comes along, there's another request for just "a little" more size allowance. Eventually, you get new portraits of house cats that look bigger than the old portraits of trolls. Kind of makes the art look thrown together instead of being well-thought out.

Disclaimer: That's just what I've gathered from various posts by the art directors. The idea seems reasonable to me, but it is also just my interpretation of hearsay.
Post Reply