04-27-2012 03:45 AM
Not sure why but getting the following error when customising control to bear a .gif I made online.
labview could not import the picture.
Possible reasons include:
-CORRUPT FILE OR INVALID PICTURE TYPE
- FILE USED BY ANOTHER APPLICATION
-NOT ENOUGH MEMORY
The .gif is only small- it loads fine on windows applications and it is not open elsewhere.
I have tried with other gif creators with the same result.
However- when I trry the same thing with any ready made random .gifs from a website they load right up.
Anybody have an idea what is going on here? Please.
04-30-2012 10:08 AM
Hi H.Barker,
Welcome to NI Forums, thank you for your post.
Regarding the importing of GIF files, LabVIEW can import 24-bit *.bmp, *.gif, and *.wmf files, but other file formats are not supported, could you confirm the bit depth of the GIF you are trying to import is 24-bit. If the bit-depth does not meet this specification please try using another application, such as Microsoft Paint, to save the file into a supported format, and then import it using Edit » Import Picture From File. Then use Edit » Paste to copy the image onto the front panel or right-click on the picture control and select Import Picture to copy the image into a control.
Failing this would it be possible to attach the GIF in question in a reply to this post, I will then attempt to convert the GIF into a useable format.
Many Thanks
04-30-2012 12:26 PM
Jamie S.
GIF supports 1, 4, & 8 bit by definition.
If LabVIEW supports only 24 bit GIF, that's a problem.
05-01-2012 02:36 AM
Sure- I'll attach the gif that works and the one that doesn't- basically was just trying some simple things out as I wanted to use the technique to make visible at certain stages of a machine operation that the software works as a front end interface for as animated visual aids to show the user what to do next with the machine.
05-01-2012 02:37 AM
Sorry- to specify- logo.gif is the one I made online that does not work and the other one is one I lifted from a free gif site that does work.
05-01-2012 04:17 AM
Hi H.Barker,
Zou is correct, LabVIEW supports all GIF bit depth images 24bit and below.
Thank you for forwarding the GIF images, I also experienced the same error when trying to import the "logo.gif" image in LabVIEW however I was able to import the image when I opened it in Microsoft Paint and resaved it as a new GIF.
This suggests there is a corruption in the original GIF file generated on the web, for example a "terminiating block" may be missing at the end of the GIF file. LabVIEW is not forgiving of GIF images that do not meet the GIF specification whereas other Windows editors may be, it seems that opening and resaving the GIF file in Microsoft Paint added the missing characters thus allowing for the file to be imported into LabVIEW.
I have attached the working GIF image to this post.
Hopefully this assists with your application H.Barker.
Many Thanks
05-01-2012 04:30 AM
Hi there- thanks for that- I tried the same thing and yes it does work but it only saves a single frame of the .gif so it acts just like a single frame jpeg or similar image file....I tried using different online .gif creators and they all returned the same error- perhaps they are all based on the same code- it might be I need to get hold of a dedicated gif creating program that has settings I can change but I did not want to go down that road until I had a clear idea what the issue might be.
05-01-2012 10:11 AM
Someone forgot to mention it's animated gif,
which patterned a few years later than the gif.
It's not the same as gif.
If your animated gif is small and slow, why not use a picture ring instead?
A native LabVIEW picture ring is a lot easier to handle.
05-01-2012 10:25 AM
Sorry that's my Bad- I assumed all gif's were potentially animated even if they only had 1 frame to them....
Picture ring? I'm not familiar with that- I'll have a look into that thank you.