|Feb 5, 2011, 03:59 PM||#1|
Creating an empty mp3 or jpg of a specific size
I need to generate files of 250/500/1000MB for test purposes and they need gombe either jpg or mp3. I know how to create an empty file of specific size but a media app needs to be able to recognise the file as a jpg or mp3 so i guess it needs at least some header info in there?
If anyone can help it really would be appreciated!
PS: Had a look on google and some other forums but no answers :-(
|Feb 5, 2011, 05:00 PM||#2|
What do you mean by "empty"? For example you could create a huge jpeg (say converted from a raw image) but then manually set the width and height via a hex editor to 0. But whatever program you're using might check for this and classify it as an invalid image.
Can you be more specific on what you're trying to test?
|Feb 5, 2011, 05:48 PM||#3|
You could just create a NSImage, set its rectangle, and write its bitmap imagerep to a file as a jpeg (if you know how to use Cocoa).
You got to be a spirit. You can't be no ghost.
|Feb 6, 2011, 12:30 AM||#4|
250MB/500MB/or 1000MB is not empty. Do you need to create the file pragmatically, or just create them somehow to use as test data to test a program?
For the JPG, I would create a huge file new image in photoshop or a similar image editor, apply some noise filter so it won't compress easily, then set the dimensions of the image until I got the desired file size.
For the mp3, maybe just start recording in garage band and let is sit overnight? Or create a file with one of the included loops that is 24 or 48 hours long? Not sure as I don't use garage band.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Creating a contact in a specific account||iloveallgadgets||iPhone Tips, Help and Troubleshooting||1||Apr 11, 2014 08:49 AM|
|How to Convert a bunch of jpg files to a file size of 900k||redsquash||OS X Mavericks (10.9)||4||Jan 15, 2014 12:07 PM|
|JPG Image Size & Internet||Rhobes||Digital Photography||2||Jun 29, 2013 01:24 AM|
|creating an empty project and setting up basics||daproject||iPhone/iPad Programming||8||May 31, 2013 07:25 PM|
|Reported size of JPG file||IanWilson||Mac Basics and Help||0||Jul 29, 2012 12:45 PM|
All times are GMT -5. The time now is 12:54 AM.