Resource links within a web view? - nativescript

Is it possible to include resource links (i.e., res://...) within a web view? My attempts so far suggest not. I can include standard tags and reference local files, but those are not scaled for the various display densities.

res:// is the format that only the NativeScript's file system would understand, more like a custom shorthand.
If you have the image inside Android's drawable folder, you may try this
file:///android_res/drawable/YOUR_FILE_NAME
For iOS, you will have to load it with absolute path.

Related

In a Xamarin Forms application. What's a Styles.xcassets file in the iOS project used for?

My application has one of these files but it doesn't seem to do anything and when I click on it, then it shows as empty.
That is an Asset Catalog Image Sets
Asset Catalog Image Sets - Use Asset Catalog Image Sets to manage and
group all version of a given image asset required by an app.
You can add images to your iOS solution, using Resources, or creating a Catalog Image Set.
You can read the official Apple Documentation
There is no default file called Styles.xcassets in the iOS project. And I think this is a normal Asset Catalog Image Sets file created by someone.
In an iOS project, the is a default Asset Catalog Image Sets called Assets.xcassets file and manager your image there.
Also, instead of using the Assets.xcassets, you can create more ....xcassets to manager your images. It can be more clear and is easier to distinguish different kinds of images.
For example, if there is a Styles.xcassets, you can put all images of style into this file. You can also create a Home.xcassets there to put all images in the homePage there.
Hope you understand What's a Styles.xcassets file in the iOS project used for now.

Insert images into the project without them being in the Resource folder.(AppleScript App)

Is there any way to use images in the format .png or another format, and then compile these images so that they are not within the folder Resource of this project? I've seen several programs using many of the images as icons but when you open the folder resource the only image I see is the icon of the program.
If items such as standard system icons are used you only need their paths (since they would already be installed), otherwise the image files need to be included in the project.

How to load images (jpg) in QML generated at runtime

my question is quite simple.
I have a Qt application with a Gui developed with QML.
My back-end side generates and saves jpg images in a folder called /images .
I am able to send from C++ to QML the strings holding the name of the images that I want to show. Sadly my QML Image object doesn't display anything.
It seems that if an image can be displayed only if it has been previously declared in the qml.qrc file.
Sadly, again, qrc files do not support wildcards yet!
https://bugreports.qt.io/browse/QTBUG-1400
Is there a workaround?
The name of the images are not fixed, they are generated with certain runtime values i.e. timestamp.
Thank you
By default it will search the image source in the qrc file. To make it go to the actual file system, prepend a file:/// to the path.

How to get full image paths from web page using Firebug?

I would like to download all images in full quality from this blog: http://w899c8kcu.homepage.t-online.de/Blog.
I have access to server, but I can not find the directory where the images lie. When I use Firebug on the first picture, it shows me http://w899c8kcu.homepage.t-online.de/Blog;session=f0577255d9df9185d3abe04af0ce922d&focus=CMTOI_de_dtag_hosting_hpcreator_widget_PictureGallery_15716702&path=image.action&frame=CMTOI_de_dtag_hosting_hpcreator_widget_PictureGallery_15716702?id=34877331&width=1000&height=2000&crop=false.
How can I find the file paths like /dirname/image.jpg?
According to its HTML output the page obviously uses the CM4all content management system (CMS).
I don't know how precisely this CMS is working, though generally CMSs normally either save the files under cryptic names within a folder specified in the CMS's configuration or not in the file system at all but within a database.
Also, CMS may only save compressed or resized versions of the original files.
So, if you don't want to or are not able to dig into the server-side script code to find out if and where the images are saved, you should contact the company behind CM4all about this.

Delphi - Want an automated way of maintaining the link between a "source" image file and images in my project

One thing I find Delphi doesn't manage well is the link between image "source" files and the image components in my project (D2006 here but I'm assuming it applies to all versions).
Say I have various static images in my project - backgrounds, toolbar button glyphs, various bits of eye candy, etc. I have a corresponding collection of PNG/BMP etc. files that I have sourced, scraped or created, and these have been loaded into the image components at design time.
One problem is that there seems to be no automated way of finding out three months later what source image file was used to load an image component. This becomes more of an issue when you need to edit one or more images.
So what I would really like, is some way of including the image source files in a build of a project. I.e. when I did a build, all of the image components would be reloaded from the sources first. At present, when I modify some of my images with PhotoShop or similar, I'm faced with a lengthy and error-prone process to reload the altered images into their respective image containers.
Is creating a resource with all of the images bound into it and adding code to load the image components at startup a viable way to go? Do others have this problem, and how do you manage it?
None of the standard components support what you are asking for. However, Thany's TPngImageList component does support the ability to associate a user-defined string with each image in the list.
Otherwise, to know which file belongs with which image, I would suggest using an .rc file to compile the external image files into the app's resources at compile-time, and then you can load the image resources into your components dynamically at run-time instead of at design-time. That way, you can manage the image files however you want. When you change a file, it will automatically be linked into the app on the next compile.
You might load the same images in runtime, and add these images in version control to ease maintenance. There are also command line tools for Lazarus (I guess you might find similar for Delphi too) which can put files into resources that you app can later use.
I load the images from ico files, populate a imagelist and then use it in my Virtual string tree for various nodes. Easy to change the ico files.
/Mikael

Resources