32-bit transparent PNG problem in a legacy Delphi project - delphi

I try to modernize a legacy Delphi VCL project using Delphi 10.3.3. I can compile and build the application without any problem. The only problem is backgrounds of transparent PNG are displayed as black in runtime.
Here is what I do:
Add MainMenu1 to the form and create menu items.
Add ImageList1.
Change ImageList1's ColorDepth to cd32Bit.
Add transparent PNG files into ImageList1.
Connect ImageList1 to MainManu1.
Here is the result in runtime:
These steps work perfect in a new Delphi 10.3.3 VCL project but there are black backgrounds in this legacy project.
What can I do to solve the black background issue?

Transparent images require Runtime Themes being activated in the Manifest section of the Project options.

Related

C++ Builder 10.2 how to support Windows 10 App Mode

I'm using C++ Builder 10.2 to create some small apps that will be ran on Windows 10.
I would like to support the Windows 10 Theme "app mode" Light and Dark. (You can see this by RMB on desktop > Personalize..., Settings dialog > Themes > Color, 'Choose your default app mode')
I don't think I'm referring to the VCL styles? I can't seem to make these work automagically when the user toggles their windows theme from Light to Dark or vice versus.
I've tried setting the background color of the main TForm to color 'clWindow' but this doesn't seem to respect the theme app mode when I toggle it from Light to Dark and vice versus.
What do I need to to do to support the Windows 10 app mode?

Migrated C++ Builder project lose Imagelist transparency

I Upgraded from C++ Builder XE7 to C++ Builder Berlin and I have a project with about 100 images in 6 ImageList controls.
In XE7 the transparency worked fine, but after the upgrade all images now have a black solid background instead of transparency.
I double checked that the ImageList's ColorDepth still was cd32bit, and it is. Everything looks file in the IDE, images are transparent, but as soon I run my application, all images have a black background instead of transparency.
I tried to drop a new TImageList, cd32bit depth and added some transparent PNG:s that worked fine in XE7. Still they show up with a black background in Runtime, but not in the IDE.
Finally figured it out!
I noted that all controls had the old Win XP style so I suspected that the wrong version of Comctl32.dll was loaded, the question was only how to change it?
The project is very old and was created before C++ Builder supported manifests. But in the project options, under Application you will find a section named "Manifest File".
Set it to "Auto Generate" and tick the checkbox "Enable Runtime Themes" and it will use the correct version of Comctl32.dll

XCode ios build places blue tint on images

XCode leaves a blue tint over the images in my iOS application, I have tried looking at the Debug settings, because the Apple Developer site states that CoreMotion places the overlay on the images, however, none of the settings are on in there. I have searched around for a few days before actually posting here, and at this point it is just really annoying. I thought it would be only on my test build, so I archived it and uploaded it to iTunes connect to have someone else try, with the same results, all the images were blue.
Note: This only happens when building on a device, the simulator does not exhibit this behavior.
The problem was that for some reason XCode compressing the image files mangled how the library I am using (SFML) read the file. Turning off PNG compression in settings fixed the problem.
For anyone needing this information 6 years later:
I have been using the SFML framework to try to build to multiple platforms (macOS, iOS, & Windows) within the last few days and I had this same issue with the iOS builds.
For each image that has the blue tint I had to manually go in and change the type in the File Inspector from PNG to BMP (or some other image type). Otherwise Xcode would compress the PNG and give it that blue tint.

Xamarin.Forms ContentPage.BackgroundImage

Xamarin.Forms
VS2013 IDE
I know there are other topics on this, but they don't answer my problem.
For Android, the background image works fine.
BackgroundImage = Device.OnPlatform("Resources/HTbg#2x.png",
"Drawable/HTMobile.png",
"Images/HTMobile.png");
For iOS, I can't get it to work.
I've tried the normal and retina versions of the image, which are of
the correct dimensions for those screens.
I've tried placing them in the root folder of the project
I've tried images with transparent or solid colored image backgrounds
In iOS, the background image, in any of the scenarios above, just shows a white screen ontop of all the CustomContentPage controls. I comment out the background line of code, and my page shows normally, with all controls and navigations links...
With the following code (no 'Resouces' folder), the page shows normally, but no image...
BackgroundImage = Device.OnPlatform("HTbg#2x.png",
"Drawable/HTMobile.png",
"Images/HTMobile.png");
How do you set the background image in iOS?
For this answer, I need to know the following:
Where do you put the image in the project so it's picked up properly?
What type of image do you use? Size? Resolution? Color depth? Transparency?
How do you let iOS 'know' what image to use if it's a 4s, 5s or 6/6+ iPhone?
EDIT
ContentPage.BackgroundImage is of type FileImageSource - meaning the correct resolution is loaded automatically; therefore the call should be...
BackgroundImage = Device.OnPlatform("HTbg.png",
"Drawable/HTMobile.png",
"Images/HTMobile.png");
But this still doesn't work. I'll add in the 4-inch image version and see if that helps...
This problem on IOS is solved by adding the required image to an IOS asset catalog. Xamarin.Forms WILL NOT load an image into the BackgroundImage property when it is located in the Resources folder as for versions of IOS pre 7. This might save someone some time.

how to set an ios app icon with Qt framework

I use Qt sdk (https://www.qt.io/blog/2013/03/05/qt-for-ios-preview) to write an iPhone app.
I can't figure out how to set the application icon.
I drag and dropped a 57*57 png file named Icon.png in the Xcode target->summary->App icon but nothing seems to happened. Same is for Launch images.
Do someone achieve to set the app icon using Xcode project generated by qmake?
I had to put
QMAKE_BUNDLE_DATA += icons
in the pro file.
https://bugreports.qt-project.org/browse/QTBUG-34624
Your Code Snippet did not work for me.

Resources