Displaying image link as image stored in mongodb in the ejs file - mongodb

Lets say i have an image link that is stored in mongodb as a string. The image is uploaded somewhere and is accessible. How would i be able to display this thing that holds the string as an image in the ejs or html page?
For example the schema is: User.
And the name that holds the string in the database = user.characterimg
However if i would put that just like that in a ejs file it would only show the string and not the actual image.

I found the solution:
src= <%=user.characterimg%>>

Related

Can not output image title and description for TYPO3 extension DCE images

I created in TYPO3 extension DCE an image field that allows to input an image with caption and title field in the backend. But I couldn't access the value of these fields to input in the alt-tag in source. No values are shown by f:debug, how can I access these values and output?
The fastest solution would be having a look into the Class Reference of TYPO3\CMS\Core\Resource\FileReference. There are many getters for the properties. They access (and are allowed to access) the mergedProperties-array. In your special case getDescription() is, what you are looking for.
So for getting description a simple {field.imageDesktop.{i}.description} should work (if field.imageDesktop.{i} is a FileReference).

How can I Load image from Centura

How can I Load an image.Jpg using Centura?
then display it in Centura and be able to load this image as a logo in the qrp reports?
For loading the image into a centura image control by setting its property as shown in the below image.
In addition to this you can also load the image pragmatically using any of the below mentioned Sal functions,
1.SalPicSetImage
bOk = SalPicSetImage ( hWndPict, strImageBytes, nType )
Inserts the contents of a string to a picture object. The third parameter is a constant.
Parameters
hWndPict Window handle. The handle (or name) of a picture.
strImageBytes String. String buffer which stores the image bytes.
nType Number. The format of the picture contents:.Example for jpg - PIC_ImageTypJPEG
2.SalPicSetFile
bOk = SalPicSetFile ( hWndPict, strFileName )
Inserts a file's contents into a picture.
Parameters
hWndPict Window Handle. The handle (or name) of a picture.
strFileName String. The name of the file whose contents are to be inserted into hWndPict.
Steps for passing an image into Qrp
1.Declare an Object in the qrp file, as shown in the below image
2.Assign the above mentioned object to Qrp picture as shown the image below,
3.Set the above mentioned object in the output list.(in centura application)
4.Assign centura image contents into a longstring variable and set it in Input list.(In centura application)
For copying centura image contents into string variable you can use SalPicGetString().

How to add an id to image in typo3?

I am struggling with typo3. I want to add a default id to a particular image uploaded in a section by user.
My backend layout create a section with colPos = 1.
In this section user can upload one image, which will have id of
bg-img
I have cleared default rendering of image by this code:
tt_content.image.20.1.layout.default.element = <img src="###SRC###" ###ALTPARAMS###>
My template code is like this:
page.10.subparts {
HEADERIMG<styles.content.get
HEADERIMG.select.where = colPos= 1
}
How to do that?
I don´t think having multiple images with the same id on a page is correct HTML, as ID´s should always be unique per page. Use the class attribute instead. With the following code you can specify image params.
tt_content.image.20.1.params = class="my-class" id="bg-img"

Cannot retrieve the fields name from form PDF using pdftk

When I try to using
pdftk my.pdf dump_data_fields >result.txt
have empty data result
Your file my.pdf may not be compatible with pdftk. Convert the file first using the following command:
>pdftk my.pdf output my_converted.pdf
Then try,
>pdftk my_converted.pdf dump_data_fields > result.txt
I've taken this from the following http://www.fpdf.org/en/script/script93.php where the converting process is suggested when the fields won't write to the pdf file so converting before dumping the fields may not help.
If your pdf has fields you it should be fillable in your pdf viewer. If in isn't fillable then it would seem that it has no fields.
This is most likely because the pdf you are using doesn't have any data fields to dump! Use a tool like Adobe Acrobat to open the pdf, go to wherever you need to to Edit Fields, and add fields anywhere you need them to show up. Make sure they are named so you can utilize them by using the attributes[] call in pdftk.
I recommend using snake case (i.e. text box named 'first_name') and then you should have access to it using attributes[:first_name] = 'your text'.
Hope this helps, let me know if you have any other questions/issues.

How to display image blob from postgres to VB 6?

I have an application written in VB6 and would like to know how I would display an image blob from postgres to VB6?
If the image blob is in one of several standard formats (BMP, JPEG, GIF, TIFF file format) you can use WIA 2.0 for this.
Get the blob as a Byte array, create a WIA.Vector object, assign the Byte array to the Vector.BinaryData property, then you can use the Vector.Picture property to retrieve a StdPicture object you can assign to an Image or PictureBox control.
This code can help if the image can be loaded to a picture box.
See the PictureFromByteStream() Function in Module1.bas