Image format plygin

Good afternoon. Tell me please how can I create a plug-in for the support of the formats of my images for the blender?

For 3d max, for example, you can create a plugin and it will use any format of the picture.

I can add the image format via the source code, I have the plug-in code for 3D max but I do not know how to reconfigure it for the blender. It is similar to the bmp plug-in difference in reading pixels. Anyone more experienced in C ++ can help me make the code for the blender if I send this code?

Did you mean Image format plugin?

You can create import export addons in python. In fact all export and import formats are written as python addons for Blender i believe, even the FBX format.

I found a simple mesh import / export addon that might help you get started

Obviously uou would deal with ‘image’ objects. Its easy to create them in python, here is a reference for that

And the python reference for images

Good luck

Yes, I want to add an image format from the old game.
rsb image file format (red storm bit map image).
bmp.c this original bmp image plygin in blender source for image.

I have a plugin based on bmp for 3d max you just need to make it to the blender format, but I do not know well with c ++.

There you need to change the reading of the pixels and the file help for the blender, and this is the main difference from the usual bmp

Again I think this is perfectly doable with python as an addon as explained before. As for the C++ source code, just do it step by step and have some easy debug images ready e.g. 2x2 pixels with specific colors in them - it makes it a lot easier to debug your code.

else if (depth == 32) {
for (i = y; i > 0; i–) {
if (top_to_bottom) {
rect = (unsigned char *) &ibuf->rect[(i - 1) * x];
for (j = x; j > 0; j–) {
rect[0] = bmp[2];
rect[1] = bmp[1];
rect[2] = bmp[0];
rect[3] = bmp[3];
rect += 4; bmp += 4;
rect[0] = bmp[2]; This image pixel in bmp.c source code?

I don’t understand your last message. You posted code in C++ i presume.
It seems to map array values from a bmp array into a rect array in a slightly different sequence as it was before.

I am happy to help with simple and quick things but i am afraid that I don’t have the time to write a plugin for you.

What do you need the format for? Maybe there is another way of solving your problem, e.g. another open source tool to convert your images outside of blender

This is a textured format for the old game Ghost Recon. There is a full plug-in for the old version 3d max 5.0 4.2 or 3.0 geometry can be saved from the blender in obj, and the texture has to be saved in 2 files because the blender by default does not read the rsb format.

There is a custom plugin for 17 max, but I can not use it, I have a project in C ++ from this plugin but I do not know C ++ at this level to create a plugin for the blender.