Search Results

Search found 20135 results on 806 pages for 'image compression'.

Page 8/806 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Compression algorithm for IEEE-754 data

    - by David Taylor
    Anyone have a recommendation on a good compression algorithm that works well with double precision floating point values? We have found that the binary representation of floating point values results in very poor compression rates with common compression programs (e.g. Zip, RAR, 7-Zip etc). The data we need to compress is a one dimensional array of 8-byte values sorted in monotonically increasing order. The values represent temperatures in Kelvin with a span typically under of 100 degrees. The number of values ranges from a few hundred to at most 64K. Clarifications All values in the array are distinct, though repetition does exist at the byte level due to the way floating point values are represented. A lossless algorithm is desired since this is scientific data. Conversion to a fixed point representation with sufficient precision (~5 decimals) might be acceptable provided there is a significant improvement in storage efficiency. Update Found an interesting article on this subject. Not sure how applicable the approach is to my requirements. http://users.ices.utexas.edu/~burtscher/papers/dcc06.pdf

    Read the article

  • Byte-Pairing for data compression

    - by user1669533
    Question about Byte-Pairing for data compression. If byte pairing converts two byte values to a single byte value, splitting the file in half, then taking a gig file and recusing it 16 times shrinks it to 62,500,000. My question is, is byte-pairing really efficient? Is the creation of a 5,000,000 iteration loop, to be conservative, efficient? I would like some feed back on and some incisive opinions please. Dave, what I read was: "The US patent office no longer grants patents on perpetual motion machines, but has recently granted at least two patents on a mathematically impossible process: compression of truly random data." I was not inferring the Patent Office was actually considering what I am inquiring about. I was merely commenting on the notion of a "mathematically impossible process." If someone has, in some way created a method of having a "single" data byte as a placeholder of 8 individual bytes of data, that would be a consideration for a patent. Now, about the mathematically impossibility of an 8 to 1 compression method, it is not so much a mathematically impossibility, but a series of rules and conditions that can be created. As long as there is the rule of 8 or 16 bit representation of storing data on a medium, there are ways to manipulate data that mirrors current methods, or creation by a new way of thinking.

    Read the article

  • Create a bitonal image for OCR using Image Magick

    - by Greg
    nice /usr/local/bin/convert -colors 2 -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg This command worked with a really OLD version of Image Magick. With the newest version this method produces a completely black image. nice /usr/local/bin/convert -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg nice /usr/local/bin/convert -colors 2 /var/www/html/uploads/pokemontest.jpg /var/www/html/uploads/pokemontestfinal.jpg This results in a bitonal gray and black image, but it's really rough. NOT clean at all.

    Read the article

  • Image container instead of event object in image load event handler

    - by avok00
    I stumbled upon a very strange thing. In FF 3.6 (not tested others yet) I add onload handler to an image like this: imgRef.addEventListener("load", activateLink, false); When load event fires, in activateLink(evt) the evt paramater is not an event, but the "a" tag that contains the image. Why is this? function activateLink(evt) { // evt turns out to be a refference to <a> tag (HTMLAnchorElement) that contains the image. // Actually two of them. Both dynamically added with addElement. } I remembered another fact that may be relevant. I have multiple images with the same src that all have registered this same event handler activateLink. Could this be the problem?

    Read the article

  • Image links work but show "broken image" in IE.

    - by Path
    I have a problem. I have made some image files for a menu. They work fine in Firefox, but IE (8, haven't tested with others) and Chrome show a broken image.. Image, on top. Even though the images work. The page is here: http://www.silkeborgmuseum.dk/udvikling/index.php This is a very old page of mine but I need to make it work. I have tried searching google and stackoverflow, but have not so far been able to find anyone else having this problem or what is causing it. Can anyone help? As a parting comment, I will say that I have only been developing websites for a few months, but wow, i already hate IE with a fiery passion.

    Read the article

  • Improving Performance on this Image Creation function

    - by Abs
    Hello all, I am making use of GD2 and the image functions to take in a string and then convert that into an image using different fonts at different sizes. The function I use is below. Currently, its pretty quick but not quick enough. The function gets called about 20 times per user and the images generated are always new ones (different) so caching isn't going to help! I was hoping to get some ideas on how to make this function faster. Maybe supply more RAM to the script running? Anything else that is specific to this PHP function? Anything else that I can do to tweak performance of this function? function generate_image($save_path, $text, $font_path, $font_size){ $font = $font_path; /* * I have simplifed the line below, its actually a function that works out the size of the box * that is need for each image as the image size is different based on font type, font size etc */ $measure = array('width' => 300, 'height'=> 120); if($measure['width'] > 900){ $measure['width'] = 900; } $im = imagecreatetruecolor($measure['width'], $measure['height']); $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, $measure['width'], $measure['height'], $white); imagettftext($im, $font_size, 0, $measure['left'], $measure['top'], $black, $font, ' '.$text); if(imagepng($im, $save_path)){ $status = true; }else{ $status = false; } imagedestroy($im); return $status; } Thanks all for any help

    Read the article

  • Upload an image using class.upload.php via AJAX, display image in form using jQuery

    - by Benjamin
    I am using class.upload.php to handle an image upload from a form that submits employee details to a MySQL database. class.upload.php does EXACTLY what I want it to do, resize the image and rename it - what I am now trying to accomplish is to upload via Ajax after the user selects the file and then display it in the form while they continue entering details. How would this best be accomplished with jQuery?

    Read the article

  • Fastest Algorithm to scale down 32Bit RGB IMAGE.

    - by Sunny
    which algorithm to use to scale down 32Bit RGB IMAGE to custom resolution? Algorithm should average pixels. for example If I have 100x100 image and I want new Image of size 20x50. Avg of first five pixels of first source row will give first pixel of dest, And avg of first two pixels of first source column will give first dest column pixel. Currently what I do is first scale down in X resolution, and after that I scale down in Y resolution. I need one temp buffer in this method. Is there any optimized method that you know?

    Read the article

  • Image Application in WPF and Perfomance.

    - by Harsha
    Hello All, I am planning to build Image processing application using WPF. Brightness /Contrast and Histogram are main operation of this application. I have downloaded the application " Foundations: Bitmaps and Pixel Bits" from http://msdn.microsoft.com/en-us/magazine/cc534995.aspx . But when I tried to open the images which are more than 1200x1600, It is very slow. How to increase the performance. Is any one worked on Image processing in WPF. Please suggest me how to solve this perfomance issue in WPF for image(more than 1600x1200) operation. Thanks you, Harsha

    Read the article

  • Serverside image processing

    - by spol
    I am designing a web application that does server side image processing in real time. Processing tasks include applying different effects like grayscale, blur, oil paint, pencil sketch etc on images in various formats. I want to build it using java/servlets which I am already familiar with. I found 3 options, 1) Use pure java imaging libraries like java.awt or http://www.jhlabs.com/ip/index.html 2) Use command line tools like Gimp/ImageMagick 3) Use c,c++ image libraries that have java bindings. I don't know which of the above options is good keeping the performance in mind. It looks like option 2) and 3) are good performance wise, but I want to be sure before I rule out 1). I have also heard gimp cannot be run using command line unless gtk or xwindows is already installed on the server. Will there be any such problems with 2) or 3) while running them server side? Also please suggest any good image processing libraries for this purpose.

    Read the article

  • Image Uploading - security issues

    - by TenaciousImpy
    Hi, I'm developing an ASP.NET Web app and would like the user to be able to either upload an image from their local system, or pass in a URL to an image. The image can either be a JPG or PNG. What security issues should I be concerned about doing this? I've seen various ways of embedding code within JPG files. Are there any methods in C# (or external libraries) which can confirm that a file is a JPG/PNG, otherwise throw an error? At the very least, I'm making the directory which holds uploaded images non-browsable and putting a max size limit of 1mb, but I'd like to implement further checks. Thanks for any advice.

    Read the article

  • Wrong image dimensions when it's dynamically loaded on a page the 1st time

    - by Nikita Barsukov
    I have the following piece of Javascript code on my web-page var central_image = document.createElement("img") central_image.setAttribute("src", imgs[curr_image_no - 1]); central_image.setAttribute("name", "jpeg"); document.getElementById("photo").appendChild(central_image); central_image.onload = getDimensions(); //function that alerts image dimensions Now, when the central_image is loaded for the 1st time in Firefox, its height always equals to 0. In IE its dimensions are 28 x 30 pixels. When I reload image, its dimensions are OK in both browsers. I guess the problem is that function getDimensions() starts before image was loaded completely. How to change that?

    Read the article

  • Which image sharing websites supports file uploading dynamically via api

    - by KoolKabin
    Hi, I have been searching for image hosting website that displays images of a user in a nice and managed way. I want to upload the files to that image hosting website in my account of that website from a page in my website. i.e if i have a website abc.com then user browse my website abc.com. Uploads the file to my website. Now I want to transfer the uploaded file to the image hosting website so that it can be viewed by other users of that hosting website and get better visibility to world

    Read the article

  • image viewer: png vs gif

    - by David Oneill
    I have a bunch of files that have .png extension. However, some of them are actually gif files. Any of the files, I can open them w/ gimp or view them in firefox, but when I try to open them with the Eye of Gnome viewer, it gives an error "Could not load image: Fatal error reading PNG image file: Not a PNG file" Is there: Another image viewer that can open files with incorrect extensions that I could use as default? It would need to have the ability to zoom in and out on images, and scroll through all the images in a folder via arrow keys. An automated way to rename the files that are actually gif files to the correct extensions? Choice 2 is preferred, but I don't now how to tell what type they are. I would be able to put together a bash script to do the renaming if there is a command that could tell me what type they are.

    Read the article

  • Which image sharing websites supports file uploading dynamically via api

    - by KoolKabin
    I have been searching for image hosting website that displays images of a user in a nice and managed way. I want to upload the files to that image hosting website in my account of that website from a page in my website. i.e if i have a website abc.com then user browse my website abc.com. Uploads the file to my website. Now I want to transfer the uploaded file to the image hosting website so that it can be viewed by other users of that hosting website and get better visibility to world

    Read the article

  • How to load Image in C# and set properties of the Picture Box

    - by SAMIR BHOGAYTA
    Create a C# application drag a picture Box, four buttons and open file dialog on the form. Write code on btn_browse Button click ----------------------------------------- private void btn_browse_Click(object sender, System.EventArgs e) { try { OpenFileDialog open = new OpenFileDialog(); open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp"; if (open.ShowDialog()==DialogResult.OK) { pictureBox1.Image = new Bitmap(open.FileName); } } catch (Exception) { throw new ApplicationException("Failed loading image"); } } Write code on btn_StretchImage Button click ------------------------------------------------ private void btn_StretchImage_Click(object sender, System.EventArgs e) { pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; } Write code on btn_AutoSize Button click ------------------------------------------------- private void btn_AutoSize_Click(object sender, System.EventArgs e) { pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; } Write code on btn_CenterImage Button click -------------------------------------------------- private void btn_CenterImage_Click(object sender, System.EventArgs e) { pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; }

    Read the article

  • error Caused by: java.lang.OutOfMemoryError Load Image

    - by user2493770
    This is my method to load images in background, the first and second load normally. But after these loading, a memory error appears. How can I fix this? public class MainArrayAdapterViewHolder extends ArrayAdapter<EmpresaListaPrincipal> { private final Context context; private ArrayList<EmpresaListaPrincipal> data_array; public DisplayImageOptions options; public ImageLoader imageLoader = ImageLoader.getInstance(); public MainArrayAdapterViewHolder(Context context, ArrayList<EmpresaListaPrincipal> list_of_ids) { super(context, R.layout.main_list_rowlayout, list_of_ids); this.context = context; this.data_array = list_of_ids; //------------- read more here https://github.com/nostra13/Android-Universal-Image-Loader options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_launcher).showImageOnFail(R.drawable.ic_launcher).resetViewBeforeLoading() .cacheOnDisc().imageScaleType(ImageScaleType.IN_SAMPLE_INT).bitmapConfig(Bitmap.Config.RGB_565).delayBeforeLoading(0).build(); File cacheDir = StorageUtils.getCacheDirectory(context); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context).memoryCacheExtraOptions(720, 1280) // default = device screen // dimensions .discCacheExtraOptions(720, 1280, CompressFormat.JPEG, 100).threadPoolSize(3) // default .threadPriority(Thread.NORM_PRIORITY - 1) // default .memoryCacheSize(2 * 1024 * 1024).discCache(new UnlimitedDiscCache(cacheDir)) // default .discCacheSize(50 * 1024 * 1024).discCacheFileCount(100).discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default .imageDownloader(new BaseImageDownloader(context)) // default .tasksProcessingOrder(QueueProcessingType.FIFO) // default .defaultDisplayImageOptions(options) // default .build(); imageLoader.init(config); } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewholder; View v = convertView; //Asociamos el layout de la lista que hemos creado e incrustamos el ViewHolder if(convertView == null){ LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); //View rowView = inflater.inflate(R.layout.main_list_rowlayout, parent, false); v = inflater.inflate(R.layout.main_list_rowlayout, parent, false); viewholder = new ViewHolder(); viewholder.textView_main_row_title = (TextView) v.findViewById(R.id.textView_main_row_title); viewholder.imageView_restaurant_icon = (ImageView) v.findViewById(R.id.imageView_restaurant_icon); viewholder.textView_main_row_direccion = (TextView) v.findViewById(R.id.textView_main_row_direccion); v.setTag(viewholder); } ImageLoadingListener mImageLoadingListenr = new ImageLoadingListener() { @Override public void onLoadingStarted(String arg0, View arg1) { // Log.e("* started *", String.valueOf("complete")); } @Override public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) { // Log.e("* complete *", String.valueOf("complete")); } @Override public void onLoadingCancelled(String arg0, View arg1) { } @Override public void onLoadingFailed(String arg0, View arg1, FailReason arg2) { // TODO Auto-generated method stub } }; try { viewholder = (ViewHolder) v.getTag(); viewholder.textView_main_row_title.setText(data_array.get(position).getNOMBRE()); viewholder.textView_main_row_direccion.setText(data_array.get(position).getDIRECCION()); String image = data_array.get(position).getURL(); // ------- image --------- try { if (image.length() > 4) imageLoader.displayImage(image, viewholder.imageView_restaurant_icon, options, mImageLoadingListenr); } catch (Exception ex) { } //textView_main_row_title.setText(name); //textView_main_row_address.setText(address); } catch (Exception e) { // TODO: handle exception } return v; } public class ViewHolder { public TextView textView_main_row_title; public TextView textView_main_row_direccion; //public TextView cargo; public ImageView imageView_restaurant_icon; } }

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >