Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Problem with PrintImage on iOS - Saves wrong background colour

Author
Message
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 15th Jul 2015 23:41 Edited at: 16th Jul 2015 01:17
If you look near to the end of the clip below you can see the problem I am having with PrintImage. (Around 2min 40s in.)
When the picture is drawn it has a black background, however when saved with the PrintImage command the background is white.

I am not sure if this is something to do with the RenderImage being used for the screen sprite before drawing it to the buffer to then print the image but there are no issues when drawing if you see the clip.



Clear screen colour is set to black so not sure what I am doing or if there is a problem?
Section of code below for saving picture which is very similar to my Paint Pot save method with no problems however I don't use render images in Paint Pot, hence why I thought it might have been that.



[EDIT]
I thought maybe it was saving the image with transparency and the black turned white due to being on a white background however I have just checked this and the image is saved as a jpg image anyway and there is no transparency.

Also the main screen sprite has transparency turned off.

Puzzled

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 17th Jul 2015 08:40 Edited at: 17th Jul 2015 08:41
I ran into this problem myself and an easy workaround is to create a solid black sprite of the appropriate dimensions and then draw it before calling render()... As such:

SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 17th Jul 2015 12:30
Cheers will have a look at that tonight

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Jul 2015 16:48
It is what you suspect. The background is transparent, and the jpg is replacing it with white.

xCept's workaround is simple enough!

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 17th Jul 2015 18:02
Cheers guys will sort it easily now, thought it might be the transparency but the jpg threw me a bit

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 17th Jul 2015 20:41
Well I did say can now sort easily didn't I? lol

I have just spent an hour on this getting really confused haha, everything I did made no difference even changing the sprite depth either got me a coloured picture with a white background again or a complete black screen, until......

I remembered I set the main screen transparency to 0, so you couldn't see the black sprite beneath!

SetSpriteTransparency(screen,0)

Changed it to, SetSpriteTransparency(screen,1) and it is working great now!

Come to think of it I had to do this for Paint Pot because on the first go the black lines were transparent until I did this fix in one of the updates for it. haha

Well thats an hour of my life I can't get back lol

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Login to post a reply

Server time is: 2024-11-16 18:20:41
Your offset time is: 2024-11-16 18:20:41