I am trying to add a brush to the Brush folder in gimp (version 2.8)-> C:\Program Files\GIMP 2\share\gimp\2.0\brushes
I chenge the extension to desert.gbr from desert.jpg.
When I open up GIMP and refresh the Brush menu it gives me an error!
Failed to load data:
Fatal parse error in brush file 'C:\Program Files\GIMP 2\share\gimp\2.0\brushes\gimp-obsolete-files\Desert.gbr': Unknown version 1067590.
Can someone help with this issue?
Thanks in Advance
Because a .jpg file is not GIMP BRush file (a.k.a. GBR).
The correct ways to transform an image into a brush is to open the image in GIMP itself,
and file->export it as a .gbr file into your brush directory.
An easier way is to open the image, copy it (ctrl + c) and select edit->paste as->new brush... from the menus - that will automatically select the correct file type and directories for you.
Unlike brushes, GIMP's patterns can be any image file - so you can copy an image directly into a GIMP's pattern resource directory, and you won't get an error like the one above.
Related
I have a series of manually edited images and layers in GIMP, each set is in a single tab. All want to save all of them into different .xcf's.
I am aware of some scripts to export them as images (like this one), but I want to save them as .xcf, not export the images. Moreover, I would like to have them in a single folder, so that I can load them all in the future.
Is there any script to do this?
You can save all projects using this code bellow
dirname = “Path of file”
path = “File name”
imgs = gimp.image_list();
num = 0;
for img in imgs:
for layer in img.layers:
fullpath = os.path.join(path, dirname+str(num)+'.xcf');
pdb.gimp_xcf_save(0, img, layer, fullpath, fullpath);
num += 1;
Or, if you can install complete plugin in https://github.com/Tushn/GIMP-Plugins/blob/master/src/saveproject.py
Instructions for install in https://github.com/Tushn/GIMP-Plugins
If you want open all file, so it’s enough that you mark all xcf in directory and enter in GIMP (click right buttom mouse, case your GIMP is not default file).
The following is my code for building a 3D Earth and showing it:
com.google.ar.sceneform.rendering.Texture.Builder builder= com.google.ar.sceneform.rendering.Texture.builder();
builder.setSource(context,R.drawable.earth);
builder.build().thenAccept(texture ->
MaterialFactory.makeOpaqueWithTexture(context, texture).
thenAccept(material -> {
earthSphereRenderable =
ShapeFactory.makeSphere(0.1f, new Vector3(0.0f, 0.0f, 0.0f), material);
Toast.makeText(context,"All done",Toast.LENGTH_SHORT).show();})
);
The Toast message is coming but I am not able to see any object. Please note that R.drawable.earth is the Earth.jpg file that I put in there, which I want to show in AR.
Here is where I am rendering it
cornerNode = new Node();
cornerNode.setParent(this);
cornerNode.setLocalPosition(localPosition);
cornerNode.setRenderable(earthSphereRenderable);
Moreover, if I replace makeOpaqueWithTexture with makeOpaqueWithColor and but color as Red then the whole thing is working fine (i.e. I can see the sphere)
What must I change here in order to be able to see the sphere with Earth's texture on it?
At this time Google Sceneform 1.8 supports 3D assets in the following formats: .obj, .glTF for which animations not supported) and .fbx with or without animations. Supported textures' formats are: .mtl, .bin, .png and .jpg.
To import a new 3D asset with textures follow these steps:
Verify that your project's app folder contains a sampledata folder. To create the folder, right-click on the app folder in the Project window, then select New > Sample Data Directory.
The sampledata folder is part of your Android Studio project, but its contents will not be included in your APK. Copy your 3D model source asset file (.obj, .fbx, or .gltf), and all of its dependencies in any of the following formats:
.mtl
.bin
.png
.jpg
into the sampledata folder.
Do not copy these source files into your project's assets or res folder, as this will cause them to be included in your APK unnecessarily. Right click the 3D model source asset and select Import Sceneform Asset to begin the import process.
The values are used by the sceneform.asset() entry in the app's build.gradle, and determine where the .sfa and .sfb – ascii and binary asset definition – files (as well as their corresponding texture files .sfm) will be generated in your project. If you're importing a model for the first time, use the default values.
Hope this helps.
Ok, I got the answer to this. It does not accept jpg files but it accepts png files. Weird stuff!
I wrote a set of few components named :
- TUser
- TRESTAccess
- TServerAccess
Then i create 3 PNG image 100x100 with same name than component (in the same directory than the BPL and the .PAS files)
I wrote a .RC file include in my package.
But can't compile : invalid format ?
does someone have any ideas how can i make the icones appear
in the component palette ?
No need to compile BRCC32
I used image 128x128 BMP format.
I click on Project / Ressource and Image
I added the image and rename identifier as the name of my component
Then uninstall package (then closed Rad Studio XE8, if not i get and access violation)
Then install my package again.
IT WORKS ! (except transparency : in the palette no transparency applied, but if i drop the component in my form, the transparency is applied !)
Trying to paste into a new brush, I get the following error message:
Error while executing script-fu-paste-as-brush:
Error: Procedure execution of file-gbr-save failed: Could not open 'C:\Users\username/brushes/mybrush2.gbr' for writing: No such file or directory
The folder "C:\Users\username\brushes" indeed does not exist;
The brushes folder in the preferences is: "C:\Users\username\ .gimp-2.6\brushes", which does exist.
To work around this, I created the "C:\Users\username\brushes" folder, and now the brush was saved to that new folder, but I got a different error:
Error while executing script-fu-paste-as-brush:
Error: Procedure execution of gimp-context-set-brush failed on invalid input arguments: Brush 'My Brush' not found
I tried to copy the gbr file from my newly created file to "C:\Users\username\ .gimp-2.6\brushes", refreshed the brushes, and indeed, my new brush appeared.
So, it seems that gimp reads the brushes from the correct folder, but tries to write new brushes into an incorrect folder!
I use GIMP 2.6.7 on Windows Vista.
i make a png resource file named glyfs.rc
GLYF_CONFEDITOR RCDATA confeditor.png GLYF_EXTRAFE RCDATA extrafe.png .......
i add it in my project.
Put a TsBitBtn (it is an alphaskin component class) and try to load the glyf from resource file
sbitbtn1.Glyph.LoadFromResourceName(HInstance,'GLYF_CONFEDITOR');
when i run i get the error resource file with name 'GLYF_CONFEDITOR' not found.
What am i doing wrong?
The 3 party tool i use for png is pngdelphi downloaded from here
But the sbitbtn loads native the png files...
There are multiple problems with your code:
TBitBtn.Glyph is of type TBitmap and TBitmap.LoadFromResourceName assumes RT_BITMAP resource type, not RT_RCDATA, hence "resource not found" error.
Even if you use RT_BITMAP it will throw EInvalidGraphic or similar¹ because again - TBitBtn.Glyph is TBitmap and naturally TBitmap wont load PNG data.
¹ there is WinAPI function LoadImage behind LoadFromResourceName, actual error message may vary.