1. Jeff Gibson
  2. PowerBuilder
  3. Wednesday, 30 October 2024 03:53 AM UTC

I have a datawindow that has a background image that we are using to print a report on top of. The image is sitting on a picture object.

For some reason, this image has a background of Fuchsia (or Magenta) in the image.

If I view the jpeg in just the picture viewer, everything looks fine.

Is there something that might be happening with themes? We haven't gone into that area, but there is zero background color set that is Fuchsia.

This is PowerBuilder 2022 R3 Build 3289. So we're not on the latest and greatest. But this just seemed to pop up out of nowhere.

Due to the fact that I can't display this entire report due to security concerns, I will show the top of the datawindow and the top of just the jpeg image.

And for the record. Nothing going on within expressions either. And there is no alpha color in a jpeg, so nothing happening there.

Any thoughts would be greatly appreciated. Before I go to the latest and greatest version, I wanted to at least get some ideas from the masses here.

Thanks.

Attachments (1)
Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 30 October 2024 13:39 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi, Jeff -

What have you done to try and troubleshoot the issue?

"This just seemed to pop up out of nowhere" - At what point? When the image was added? When the DW was modified?

Are you placing the picture control in the background layer?

How was the jpeg image produced (what software)? Does a different image produced with the same software also exhibit this problem when used in the DataWindow?

If you remove the picture control and make no other changes to the DataWindow, does the DataWindow render correctly? If so, that would lead me to believe there is some kind of issue with the jpeg. I would try using the Windows Paint utility (not Paint3D) to open a copy of the jpeg image and use Save As to save it in .png format and try that in the DataWindow. If that works, but you still need to use the image in jpeg format, edit the .png in Paint and Save As in jpeg format, then try that jpeg in place of the original image.

It's very difficult for us to speculate on the cause without being able to examine the object(s) firsthand, but I completely understand that you cannot share proprietary/sensitive information. As an alternative, however, can you reproduce the issue in a non-sensitive, example DataWindow that you can post?

Best regards, John

Comment
  1. Jeff Gibson
  2. Wednesday, 30 October 2024 19:33 PM UTC
Sorry John. I should have been a little more clear.

-- "This just seemed to pop up out of nowhere" - At what point? When the image was added? When the DW was modified?

This app has been live for over 25 years. It was in PB8 when we got our hands on it. When I preview the datawindow (just in the IDE, not at runtime), it previews just fine in PB8. When I open it in the PowerBuilder 2022 R3 IDE, now we see the JPEG with the Fuchsia color Heck, for all I know they just printed this report after we did the migration over 2 years ago. When it's printed it shows a colored image on the report at runtime.



-- Are you placing the picture control in the background layer?

The JPEG is not in the background layer. It's in a picture control placed in the detail band.



-- How was the jpeg image produced (what software)? Does a different image produced with the same software also exhibit this problem when used in the DataWindow?

I honestly have no idea how they created the JPEG. It could have been a scan they did of a pre-printed form that has just that are placed over the image.



-- If you remove the picture control and make no other changes to the DataWindow, does the DataWindow render correctly? If so, that would lead me to believe there is some kind of issue with the jpeg.

Yes, the datawindow populates with the picture there, or with the picture not being there.



-- I would try using the Windows Paint utility (not Paint3D) to open a copy of the jpeg image and use Save As to save it in .png format and try that in the DataWindow. If that works, but you still need to use the image in jpeg format, edit the .png in Paint and Save As in jpeg format, then try that jpeg in place of the original image.

We don't need to use a JPEG. It's a smattering of all sorts of different image types all over the app. I actually just tied what you mentioned. I converted the file from JPEG to PNG using Windows Paint (not 3D). That cleaned up the image. I will try and see if converting it back to a JPEG from the PNG removes the Fuchsia color.



I appreciate you understanding the sensitive nature of the datawindow. I will push it up to the Appeon team if they decide they want to look deeper into this issue.
  1. Helpful
There are no comments made yet.
Jeff Gibson Accepted Answer Pending Moderation
  1. Friday, 1 November 2024 16:09 PM UTC
  2. PowerBuilder
  3. # 1

Giving John Fauss the accepted response on this because he was the first one to tell me to try and save the file to a PNG. We have tested in production and the PNG image is working just like the JPEG did in the PB8 environment. Still a very interesting find that may stem from what Roland was saying that JPEG's at one point way back in the day had some kind of transparency color. Either way, I appreciate the help everyone.

Comment
  1. John Fauss
  2. Friday, 1 November 2024 19:33 PM UTC
That's great news, Jeff! Good luck on your upgrade/migration!
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 31 October 2024 13:18 PM UTC
  2. PowerBuilder
  3. # 2

I think it might be a problem with the transparency layer in the image. Try to create a version of the image that has white for the background color.

Comment
  1. Roland Smith
  2. Thursday, 31 October 2024 17:24 PM UTC
Back in the PB8 timeframe I had an image on one of my apps with non-standard transparency that at some point started showing as magenta. This was before PB supported PNG so I had to make the background the same color as the window.
  1. Helpful
  1. Jeff Gibson
  2. Thursday, 31 October 2024 18:45 PM UTC
I did end up converting the image to a PNG file. This fixed the Magenta issue with it showing up. I then ended up saving the image back to a JPEG, and when I did that, we lost the color depth of the image. It went to more of a grey scale. Effectively the issue is fixed right now, but it's bizarre that the image works correctly in the PB8 environment, but flips to Magenta in PB 2022 R3.
  1. Helpful
  1. Roland Smith
  2. Thursday, 31 October 2024 19:52 PM UTC
I think that way back in the beginning, the developer created the JPEG in an app that supported non-standard transparency. Then at some point PowerBuilder stopped supporting the non-standard transparency. Probably not on purpose.
  1. Helpful 1
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 30 October 2024 12:19 PM UTC
  2. PowerBuilder
  3. # 3

Hi Jeff;

  FYI: the lastest version is actually 3391. That being said, the issue of the image appearing fushia is still weird. Have you tried producing a PDF with that DWO using a PostScript driver like Ghostscript to see if it's a NativePDF issue OR vice versa?

Regards ... Chris 

Comment
  1. Jeff Gibson
  2. Wednesday, 30 October 2024 19:35 PM UTC
Yeah. I had wondered if this might be an issue with the version that we are running. I'm going to migrate the code up to the latest and greatest version and see if that makes a change. I will advise if that fixes the issue.

We also print the report to PDF and it does show the blanket of color when printed.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.