i used CircleAvatar and input backgroundImage: AssetImage('assets/image's name')
also i modified pubspec.yaml (I used command / to assets line)
but, I don't see the image in my emulator..
I don't know what caused it.
I attach an image for a detailed explanation.
The picture of the squirrel on the left is the image I want.
However, the widget shows a blue circle.
you forgot to put .jpeg after the name
In Flutter, when you are trying to display an image, it's important to include the proper image file extension (e.g. .jpeg, .png, .gif, etc.) at the end of the file name. If the extension is missing, the image won't be displayed. To resolve this issue, simply add the correct extension to the end of the file name in the code that defines the image path. For example, if the original code reads
Image.asset("example_image")
change it to
Image.asset("example_image.jpeg")
Related
I’m using capacitor pdf-generator plugin to create a pdf. I managed to do so as long as the html code is limited to non image tag, code in which I inject some dynamic data by nesting variable using ${ }.
Now, my aim is to bind the src attribute of an ```img`` tag to a variable so that I can change the logo displayed in the created PDF.
Where I fail: what appears on the PDF is a white space with dashed borders (check picture attached). So I guess that the path must be correct because if not it would show the missing icon (issue I went through before I could format correctly the path).
Anyone who already had that trouble?
Finally bypassed this issue by storing the base64 data when selecting a logo and using it directly in the img tag.
<img src="data:image/png;base64,${base64data} " />
You can convert the images to base64 here https://www.base64-image.de/
then add the codes directly to your image tag
I am trying to have TYPO3 10.4.12 generate webp images as described in the example on this page: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.3/Feature-90416-SpecificTargetFileExtensionInImage-relatedViewHelpers.html
{f:uri.image(image:images.0, fileExtension: 'webp')}
I am using GraphicsMagick and with gm version I get
WebP yes
and converting a picture to webp manually via command line works.
Also cwebp is installed.
If I try fileExtension: 'png' it generates a png file so the parameter seems to work.
However the image does not get converted, instead the original unprocessed image gets referenced.
The main problem seems to have been that I needed to add webp to the [GFX][imagefile_ext] configuration.
Additionally sometimes it only worked after removing all generated images under Remove Temporary Assets in the Maintenance section.
Yes that is true, webp must be added to image file list. In addition we faced another problem with webp. If you create an image as jpg with a width and after that the same image as webp also in the same width, only the jpg was generated. That's why we added 1px to the jpg images.
Now nearly all picutures are delivered in a modern way on https://www.in2code.de
How can I call an image that I have saved in the xcassets folder?
I'm using ARKit. I'd like to make an "Earth" figure by wrapping an "Earth" skin around a spherical node. I can assign a color to it, like so:
earth.geometry?.firstMaterial?.diffuse.contents = UIColor.blue
But I'm unable to assign textures using either:
earth.geometry?.firstMaterial?.diffuse.contents = "#imageLiteral(resourceName:8k_earth_daymap)
or
earth.geometry?.firstMaterial?.diffuse.contents = UIImage(named:"8k_earth_daymap.jpg")
Am I using the wrong commands? It seems like Xcode does not recognize the 8k_earth_daymap.jpg file I have saved locally in xcassets...
earth.geometry?.firstMaterial?.diffuse.contents = "#imageLiteral(resourceName:8k_earth_daymap) is not real code; there is an extra quotation mark, so this wouldn't compile.
earth.geometry?.firstMaterial?.diffuse.contents = UIImage(named:"8k_earth_daymap.jpg") is wrong, because .jpg would not be part of the name of an image set.
Finally, the phrase "that I have saved in the xcassets folder" is worrisome. You must not put anything manually into the xcassets folder. You must let Xcode do that. You simply edit the asset catalog in the project navigator and work by way of Xcode's asset catalog editor window. If you're not working through this window, you're doing it wrong:
Thank you, #matt. Your suggestion helped. I was adding the jpg extension when it was not needed. I was also calling the image using an Image Literal, but for some reason, it did not work. I was able to call the image using UIImage.
I have in my Typo3 Content text and image. And i would like to insert a animated gif. I first made it normal, than i recognized that the gif changed to .png files.
After a few test I found the parameter (FE png_to_gif), in the Install Tool.
But when I choose this. The gif files has the path fileadmin/processed but there are no gif files in this directory.
Can anybody help me that i can display my animated gifs ?
Thank you.
If the image you are processing is resized or modified by ImageMagick/GraphicsMagick, all frames of an animation will be lost. Use the orginal size in the frontend to avoid this.
Hi try select "None (ignores all other options)" under Apperance->Quality and Type
gl
Like Merec answered: the animation will be lost trough processing ...
an option is to intervene on the rendering of the fluid-template: in your own extension you overwrite the original fluid-template and find the image-viewhelper the ouputs the image:
This processes the image also when no width or height are given
<f:image image="{imageObject}" />
This without size will not (or use the variable directly)
<f:image src="{imageObject.0.originalResource.publicUrl}" />
(note that an imageobject is often an array, to find that out <f:debug>{_imageObject}</f:debug> or <f:debug>{_all}</f:debug>)
This seems to me as a bug because I have changed images with:
someImage.image = [UIImage imageNamed:#"anotherImage.png"];
and I have never had a problem. so let me show you what I have:
I have placed an UIImageView:
note that imgObjetivos is conected to this UIImageView.
I have a method that get's called when clicking the following button:
and the method contains:
as you can see I just want to change the current image with:
so when I run the application in the simulator everything looks great:
and when I press the button the image changes successfully:
Now why is it that when I run the application on my iPad the image does not change!? when I press the button the image disappears instead of getting a new image like in the simulator. I just learned objective-c and I am starting to dislike it. What am I doing wrong?
EDIT
I found a solution I changed the name of the image and now it works:
but this makes no sense. Which names works and which ones do not? I also have make sure that I don't have two images with the same name and that is not the case. when I have a few letters after the '_' underscore it does not work. This is really strange. I am starting to dislike objective-c :(
I've had the same problem before. The problem is that the image that you're using to replace the previous image is corrupted or say is not in it's original format.
In my case, I downloaded images in the web which was .jpg format and renamed it as .png format which actually made it .png. so in short term, ipad does not support the functionality for converting image format by just renaming the extension. you have to have a proper converter or something.
I would go with removing the image file from the project, clean the project and add the file back.
I had to rename the image name to something else I don't understand why... I thought that the problem was because I previously deleted that image that contained the same name but that is not the case because I imported the image with a similar name to the solution and I had the same problem. for example the original name of the image was objetivosFoto_h.png and when I renamed to objetivosFoto_ho.png it still did not work but when I renamed to objetivosFoto_horizontal.png it worked.