WebGL 2D Texture Display Error - safari

I'm having an odd problem. On Chrome and Firefox, everything is fine, but in Safari when I load 2D images onto a particular panel (using WebGL) I get the following error:
WebGL: INVALID_VALUE: texImage2D: packImage error
The images are greyscale 128x128 jpegs. I can provide more code if necessary, but I'm having trouble even finding out what this packImage error means.
Thanks!

I found that after loading the texture, you just need to set the appropriate format. For instance:
var tex = THREE.ImageUtils.loadTexture('img/grayscale.png');
tex.format = THREE.LuminanceFormat;

Related

Convert Vulkan nvpro app to vulkan headless

I am trying to convert vk_raytrace to headless so that I can run it via commandline and dump rendered image. I am new to vulkan and saw that vulkan supports headless surface. My first approach was to replace the surface created using glfw window to a headless surface. However, I get VK_ERROR_EXTENSION_NOT_PRESENT for VK_EXT_headless_surface. Next I tried removing surface and swapchain related logic and create frame buffers with image view as attachment. Haven't had any luck with that either.
Any pointers on this would be very helpful.

Blender Texturing doesn't show up correctly after repeatedly baked on it even though UV-Mapping fits perfectly

The problem occurs, when I baked lightings & reflections via Principled-BSDF (Cycles) on an "Image Texture"-Node repeatedly. The first times I get excpected solutions and then suddenly the mesh seams to be broken as it keeps showing future bakings incorrectly (image below).
Also when I move an island in the UV-Map nothing seams to changes on the Mesh in the 3D-Viewport. The UV-Texture looks unchanged no matter what I do. Like it has frozen or something.
My Blender Version is: 2.92. Im getting the same problem with 2.83.
I keep getting this problem over and over and I just can't find a solution. Even if I exported the mesh in another project. It just "infects" the other project and I get the same problem there.
I only can repair it if I completely start over.
Please help me. I'm really frustrated with this. This has defeated my blender project now for like the 4th time... :/
> Screenshot example here <
It appears as if the generated texture coordinates are being used for some reason instead of the UVMap coordinates. If the vector socket of the of the image texture node is unconnected it should use the current selected UVMap.
This may actually be a bug if it's happening after multiple uses of the baking tool.
You should first try connecting the image vector input to the uv output of a texture coordinate node to see if it has any effect. Alternatively try to connect a UVMap node

python-pptx with matplotlib fix image resolution

i am trying to generate a graph using matplotlib and save it to python-pptx . everything is working fine but the image resolution is low when imported to pptx.( i am just saving to memory using StringIO then using add_picture() in pptx to add image)
when i do :
some_image_in_memory = StringIO()
plt.savefig(some_image_in_memory)
it works fine but give low res image but when i do :
plt.savefig(some_image_in_memory, format='svg')
i get error:
cannot identify image file <StringIO.StringIO INstamce at ..>
is this even correct? svg should maintain resolution but i cant read this in pptx.
I got around this by setting dpi value to savefig():
ex
plt.savefig(some_image_stream_in_memory, dpi=1200)
Unfortunately, PowerPoint does not directly support the SVG format (I've heard it's a turf issue between MS and Adobe). I expect that explains the error you're getting when you save with format=svg.
Other folks seem to have good luck with the PNG format from matplotlib. I kind of suppose that's the default image format, but might be worth a check.
The other thing that occurs to me is I don't see anywhere you have specified the size of the graph to be saved from matplotlib. If it is getting saved as a small image and then getting scaled significantly larger when displaying it in PowerPoint, this will produce a "grainy" appearance.

"Parameter is not valid" error when resizing remote image

Image using the remotereader plugin to resize images. The following image will render correctly in the browser when accessed directly but when access via the remotereader gives a 500 server error.
URL: http://images.britishpathe.com/?id=22797&num=55&size=thumb
GIST of the error page: https://gist.github.com/19nine78/5857810
This message means the byte stream is not a valid image.
If you download the image and attempt to resize it as a local image, do you get the same result?
If yes: you know that the error is due to an irregularity in the jpeg file.
If no: then it's likely that a network-level issue, such as a reverse proxy, is modifying the byte stream and preventing the image from being parsed properly.

Sample cairo applications to test cairo-gles backend in 1.12.14

I was able to successfully port, cross compile and run the cairo gears
application in gles backend, on my embedded system target.
http://people.linaro.org/~afrantzis/cairogears-0~git20100719.2b01100+gles2.tar.gz
The ported samples trap, comp, text and shadow run well in cairo1.12.3
and 1.12.4.
But I face problem in running the same in 1.12.14.
I could not run the texture related samples like comp, text, shadow.
Trap plays well but the gradient could not be displayed in the gradient sample.
I use gles backend and converting all image surfaces I load from png
file to gl surface.
Let me know if there is something that should be done for the
texture+gradient samples to work in 1.12.14.
thanks
Sundara raghavan
The problem was because of the need to convert the GL_BGRA,the internal image format of cairo , to GL_RGBA for loading in to GL textures (which were GL_RGBA by default). I solved it by applying an existing patch which uses BGRA GL texture and hence avoids conversion. This was possible because my hardware is capable of both reading as well as creating bgra textures.
The Patch was found here:
http://lists.freedesktop.org/archives/cairo/2013-February/024038.html