Exporting image styles in Drupal 7? I know that there is a hook to programmatically define image styles in code but I can't find anyway to export ones that already exist in the database to code?
The best way to do this is almost always by using the features module.

That being said if you do not want to use feature this is how you can do it.

In your module you're going to want to define a hook_image_default_styles().

If you already have a style on the database that you would like to define in this hook the best way to accomplish this is by doing something like 

$style_name = "name_of_your_style";
$style = image_style_load($style_name);
//$style now has everything you need for your hook_image_default_styles definition.


It does has some extra stuff in there that can be removed such as the isid, ieid, and storage keys. You should remove those keys when using hook_image_default_styles.

If you want to find out how other items are exported out the best bet would be to look at the feature module. In there there's a directory call includes. There's going to be a file in there for everything that can be exported out in core. So you can use that for examples on how to export out styles, filters, field, etc.

Hope this answers your question.