Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Image::Copy  (Read 2771 times)

0 Members and 2 Guests are viewing this topic.

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Image::Copy
« on: January 03, 2009, 04:36:11 pm »
Using sf::Image::Copy (or LoadFromPixels w/GetPixelsPtr) I keep getting a single white pixel in the bottom-right corner of the destination image.

Code: [Select]

sf::Image sourceImage;
... (load image, etc)
sf::Image destImage;
destImage.Create(sourceImage.GetWidth(), sourceImage.GetHeight());
destImage.Copy(sourceImage, 0, 0);

So here destImage would look just like sourceImage, except it would have a white pixel in the bottom-right corner.

This doesn't seem to happen every time, but often it does.
I'm using the latest SVN.
I can post more info later if needed.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Image::Copy
« Reply #1 on: January 03, 2009, 04:52:51 pm »
Thanks for your feedback.

Can you give a sample code + image which always reproduces the problem? Or is it really happening randomly, even with the same context?
Laurent Gomila - SFML developer

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
Image::Copy
« Reply #2 on: January 03, 2009, 10:41:20 pm »
I can't seem to produce a working example outside of some sfttf code.

I'll have to investigate it a little more.
I'm tired of it today, so maybe tomorrow.  :P

 

anything