I'm trying to load multiple images with the UTFT_SDRaw library. I had some .raw files from the internet and they worked nicely. Now I made an image in png and converted it to Raw with a program called:
"Fiji ImageJ". After converting I moved it to my 4gb 32Fat sdcard. Changed the code a bit and the old images still loaded but my image is like a rainbow dotted square. I assume the file type isn't right although it's .raw. I can't find any specifications on the working images or what so ever and can't find anything on google.
Does someone have a program that can be used to convert my pngs to raw properly?
Or is there something else i did wrong?
Related
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.
can someone help me to resize an HTML file produce with plotly in Jupyter?
This is the code I am using to save to an HTML file:
fig.write_html("D:\jupyter\image.html")
It works but now I want to control for the size. Here (https://plotly.com/python/interactive-html-export/) is suggested how to do it but I cannot get my head around to how specifically write the code to not get a big image
If you type fig.write_html? inside a cell you can read all the documentation, which is a little more explicit than the document you posted. In short
fig.write_html("output.html",
include_plotlyjs="cdn")
Should produce a file ~3MB smaller than the one you are getting now as this option point to the plotly.js online instead of include it on the output.
I have been working on exporting Highchart to JPEG image. I have downloaded the asp.net code for exporting.
Everything works fine, just the image exported has a blank square on the up-left corn. (sorry, I don't have enough reputation to post an image)
However, the exact same code, but I change the export url to "http://export.highcharts.com/", then export to image, it looks fine.
So I am assuming nothing is wrong with my code? unless I have missed some configurations? Can anybody help thanks.
I am working with a js library named Highcharts and it is only working some of the time.
In all cases the links to the library are relative and I have proven that the code is not at faUlt (at least, not the code I have written). I am also loading a seperate library which works fine on all platforms.
If I load the page in IE the address is:
C:\path\to\file
If I upload it, then:
http://www.foo-bar.com/path/to/file
These both work.
However, if I open it locally in FF or Chrome, then the path is:
file:///C:/path/to/file
This last one doesn't work. Does anyone know why this might be?
Thanks in advance.
The problem here was Access-Control-Allow-Origin. My solution was to load the data as inline jSON, rather than link to a csv with the data in it.
I would like to use SVGs in menus and buttons around a Qt-4.7 application. The images are rendered correctly across linux and windows platforms, however an obnoxious message reading...
couldn't create image from ""
...is printed to the console seemingly as soon as one of these images is loaded or changes state (like highlighting or disabling its container widget). Over the course of the run of the application, many of these lines are printed, leaving a lot of senseless output crufted around reasonable application output.
Poking around the Qt code a bit, this appears to be coming from svg/qsvghandler.cpp:2680 where the line contains the following.
qDebug()<<"couldn't create image from "<<filename;
From the documentation for qDebug, you would think that I could block this by defining QT_NO_DEBUG_OUTPUT at compiletime, but this will only block the application's compiled debug calls, not the one in Qt's SVG library.
So I guess my question is actually two-fold:
As in the title, why is Qt printing this even when rendering SVGs correctly?
Without recompiling Qt or its SVG library, how do I prevent Qt from printing this and crufting the application's output?
I've also posted this question on the QtCentre forums.
To #2: You can prevent qDebug output by using qIntallMsgHandler and writing a handler that just discard the message. Also see this question: How to redirect qDebug, qWarning, qCritical etc output?
Re #1: I'm no expert on SVG but from the Qt source code where that line appears, it looks like Qt is trying to load an image file referenced in an xlink:href attribute. The output you see would seem to indicate that either the value for that attribute is "" or the value is a bunch of white space characters enclosed in "" which is removed by a call to QString.trimmed() which is then used as the name of an image file to be loaded into a QImage. I can't quite discern if the filename is ending up as an empty string or two quotes :)
I would have to guess that either the SVG files you have are filled with empty string xlink:href attributes (probably links or filenames for texture images) or there is something about the SVG file causing Qt to incorrectly parse it. I would lean towards the former.
What is your criteria for concluding that they are being rendered correctly? Perhaps you could open the SVG files in a text editor and look at the xlink:href occurances in it?
I've had a similar issue, I used Adobe Illustrator to create images and then save as SVG. The problem is that hidden layers in Illustrator still gets written to the SVG file, but its display property is set to "none". In my case a hidden layer of a file I "placed" - to get an idea if the background I'm creating would look OK.
This causes your image to render correctly as you say, but Qt complains about the missing invisible layer in the SVG file. If you open the SVG file in a text viewer you might find the hidden layer looks something like this:
<g id="bglogo_x5F_splash" style="display:none;">
<image style="display:inline;overflow:visible;" width="1740" height="438" xlink:href="../logo_preview.png" transform="matrix(1 0 0 1 154 409)">
</image>
</g>
Qt will complain about the missing "../logo_preview.png" file.
Hope this helps