AR.JS custom marker generator returns .patt file with all 0s - aframe

I'm trying to create an A-Frame/AR.js project that uses custom markers, it works well with marker presets but every time I upload a custom .patt file nothing shows up in front of the camera.
I'm using this custom marker generator. At first I thought maybe the issue is with the images I'm uploading but then I realized that no matter the image everytime I click 'Download marker' .patt file comes back with all 0s. So my assumption is that something is wrong with the generator itself when (not) picking up uploaded images?
I was wondering if anyone else ran into the same issue / realization and found a way around it.
Thank you!

Solved! It only works with .jpg images - .patt file comes back with all 0s when .png images are being uploaded. I hope other folks will find it helpful, too.

Related

AEM DAM image replace - references in pages not updating

I have a problem with references to an image not updating in pages that are using that image.
This is the steps that the users are reporting
go to /siteadmin#/content/dam/
on the "new" dropdown menu, select "new file"
select an image file that is a different image but has the same name as a file that already exists
upload the file and when asked that a file already exists, choose replace
activate the file when the upload completes
The problem is that when I check pub I can see the image is updated, and if I navigate to the path of the image, for example:
pub1.mypub:4503/content/dam//my-image.png
I can see the new image I replaced the old one with
the problem is that pages that were referencing the image, specifically the image component, still shows the old image. I've check flush rules, checked workflows and nothing seems to work
The one thing I noticed is that in pages that are referencing the image the path is like this
/content//_jcr_content/my-component/my-component-parsys/columns/parsyscenter/image.img.jpg/1538602163986.jpg
so it seems the path it is using is like a generated path and not the same path as this one: pub1.mypub:4503/content/dam//my-image.png
im at a complete loss, I honestly do not know what else to check, has anyone ran into this and figured out how to fix it?
this is on aem 6.3
the problem is that in pubs the image being referenced in the component does not update, and since it does not update in pub, it never updates dispatcher
You can try activating the referenced pages after the image has been published. Since the page on publish has reference to the previous image.

how to refresh image in codenameone(netbeans)

Im creating the UI of my application from a PSD file following the instructions in: https://www.codenameone.com/blog/psd-to-app-revisited.html (by using the css support plugin), everything is fine, but i edited one of the images in photoshop and exported it again to my codenameone folder(replacing the original image) and i thought the new image would replace the original one, but the application is still showing the old image(it seems as it is cached or something similar).
I already tried "Clean and build project" but didnt worked, also went to the generated .res file and tried to delete the original image but it says i must first delete the themes that use them(which i dont want to do). Is there any way to "refresh" the images referenced in the .res file so they reflect the latest image in the folder? or a "clear cache" or something similar. For now i renamed the image, and also changed the name in the css,but i think is not the best way cause that implies creating new names for your images, and editing your css with every little change.
If you change the image directly in the file system you need to do this when the designer is closed. Then reopen the designer res file and save it so the image is updated.

Why my image source is not working for my current local machine but it's working for the web sources?

I have a div and I want to show images as innerhtml using the back end C# code. So that I can generate them as I want them to. In here for innerhtml everything is running fine but the images. While I am giving it a path from my current localhost the images are not showing but while I am putting an web url its working why?
Even if I tested taking the suggestion from the visualstudio like I put a static image in front end and took its path but its still not working. I user the server.mappath(test) this function too.
test = "App_Data/images/37id4.jpg";
divfifth.InnerHtml ="<img src='"+test+"' />";
This says the path is not found here is my code given.
if anyone can suggest me to generate these in better way please suggest.
Hello #Borshon Aeolus Saydur , Its a nice question. Try to give add path like "~/images/.." format. instead of "Images/..".
i have solved it by moving my image folder one layer up.although i dont know what was the wrong in previous layer.but its now working after moving it to its upper layer..

How to return the generated image by phpThumb and not the original one with code appended?

I'm generating images through phpThumb on my Wordpress based website using Magic Fields 2 but I'm having problems posting those images to We Heart It and other websites since they don't recognize it as an image due to all the code appended.
Therefore I was wondering if there's a way to make phpThumb return the actual generated image thumbnail link instead of the original link with all the code appended like:
http://www.mywebsite.com/wp-content/themes/basetheme/phpThumb/phpThumb.php?src=http://www.mywebsite.com/wp-content/files_mf/1331856830IMG_0286.jpg&w=364&h=200&zc=1&q=95
Is there any way to achieve this?
http://ailoo.net/2008/07/wordpress-plugin-autothumb-phpthumb/ <-- I'm using this plugin for the same! :)

Outputting Images in ASP FPDF problem

Hi
I'm attempting to use the ASPFPDF class to output an image on a pdf using the very simple code below:
<!--#include file="fpdf.asp"-->
<%
Dim pages
Dim pdf
Set pdf=CreateJsObject("FPDF")
pdf.CreatePDF "P", "mm", "A4"
pdf.SetPath "fpdf/"
pdf.Open()
pdf.AddPage("P")
pdf.Image "invoiceheader.jpg"
pdf.Output ()
%>
When run, this script should open the pdf but with Adobe Reader I get a "File does not begin with %pdf" message. I've tried using other readers with similar results.
If I remove the image line and output some text (e.g. pdf.Cell 40,5,"Date",0,1,"R"), everything works perfectly.
Anyone got any ideas before I go mad!
Thank you.
Try this one
pdf.Image "IMAGES/invoiceheader.jpg", 140, 22, 50, 40
Here 140 is the x position, 22 is the y-position 50 is the width and 40 is the height.
I don't know AspFPdf, but don't you need to specify a folder where the image is to be found ?
Did you try ?
pdf.Image "fpdf/invoiceheader.jpg"
As I said, I don't know the component, just my thoughts (although you have propably tried this yourself).
[EDIT] Look at the website of Asp Fpdf and saw the following in the documentation:
file
Path or URL of the image.
Asp fPdf : Image parameter
Anyway: thanks for pointing me in the direction of this component (even though this was not your intention). I can use this too ;-)
Just thought I'd update people as I've spent ages and have finally got this working. What you don't see due to random error messages is that the FPDF application creates a temporary PDF as it's building it. By default, it will create it in the same folder as your asp page that runs it.
e.g. My page was in my web root \createpdf.asp
I worked out that it was trying to create a file called D10456.tmp (name changes each time) in my web root but it couldn't due to security.
I added an output file name and changed the security in another folder to allow write access and it worked first time.
Code for output file:
pdf.Output server.mappath("pdfs\list.pdf"),"F"
The PDFS folder must have write access to work.
Hope that helps people.
The answer by Paul is also correct for the format of adding an image in ASP.
Also, I had to change the images.asp file which is located in the includes directory.
I had to change the line:
this.Buffer.LoadFromFile(Server.MapPath("\\") + ("\\") + ("Images") + ("\\") + pFileName);
to
this.Buffer.LoadFromFile(Server.MapPath(pFileName));
because it was looking in the wrong folder for my images.
The answer to the above question is that the FPDF seems to need to be on a fully qualified domain - I was running on a machine with using a custom hosts file to point the URL at the development server. As soon as I moved the code to the live server, everything worked!
I don't fully understand why, but this might help someone else...
I found that the only way I could add images was as follows:-
pdf.Image "./byimage.jpg",x,y,width
This is how i manage to display my image in ASP classic page:
pdf.Image "fpdf/header.jpg", 10, 10,80,20, "jpg"
if not mistakes, this is how to define the variables (correct me if i'm wrong):
pdf.image "folder/image.type", x-coordinate, y-coordinate, img width, img height, "image type"
hope it helps. because i've spent many days just to find how to display the image in my asp classic page..

Resources