Category : image

I’m new to OpenGL and am currently struggling to get it to display a simple 2D-image. After a lot of black windows and some nice help here, I finally saw something. But I’m stuck at what you can see in the images below. I’m computing the mandelbrot set with a compute shader first. When I ..

Read more

I’m stuck at simply drawing an image into an OpenGL window. I’m using GLEW and GLFW. My code looks like this (part of it): GLuint VertexArrayID; glGenVertexArrays(1, &VertexArrayID); glBindVertexArray(VertexArrayID); GLuint shader = CreateShaders("something"); // Compiles and does OpenGL-Stuff (I checked – it works) glClearColor(0.5f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glUseProgram(shader); GLuint vertexBuffer; glGenBuffers(1, &vertexBuffer); ..

Read more

I’m new to writing code and I don’t understand many things, what could be a mistake? I’m trying to write a function in order to convert an image into bytes static BYTE ImageToByte2(System::Drawing::Image img) { BYTE result; System::Byte result; System::IO::MemoryStream memoryStream = new System::IO::MemoryStream(); { img.Save(memoryStream, System::Drawing::Imaging::ImageFormat.Png); result = memoryStream.ToArray(); } return result; } Error: ..

Read more

I was working on a project that includes PCB images, recently I have noticed that some images are rotated automatically(180 deg). When I tried sending the image to any other server (tried on whatsapp, gdrive), a 180 deg rotated image is sent. I have not encountered this before and I don’t know why this is ..

Read more